1 #!/usr/bin/env python
 2 # -*- coding: utf-8 -*-
 3 # @Time    : 2019/10/14 13:54
 4 # @Author  : zoulixiang
 5 # @Site    : 
 6 # @File    : ran_gman.py
 7 # @Software: PyCharm
 8 import random
 9 '''随机杀程序节点'''
10 def Ip_gman(file):
11     with open(file, 'r') as f:
12         data = f.read().split()
13         #print(data)
14     return data
15 
16 def Rand_gman(file):
17     data = Ip_gman(file)
18     ##    print(i)
19     datas = random.choice(data)
20     print(datas,"xxx")
21 
22 if __name__ == '__main__':
23     file = './IPLIST'
24     Rand_gman(file)

 

相关文章:

  • 2022-01-19
  • 2022-12-23
  • 2022-12-23
  • 2021-12-01
  • 2022-02-09
  • 2022-12-23
  • 2021-05-31
  • 2022-02-26
猜你喜欢
  • 2022-01-12
  • 2022-12-23
  • 2021-11-29
  • 2022-12-23
  • 2021-12-16
  • 2021-07-22
  • 2022-12-23
相关资源
相似解决方案