随笔分类 - python
摘要:def get_ip(count='10', start='2001:2:3:4:5:6:7:8'): starts = start.split(':') A = int(starts[0], 16) # int('a',16) 将字符串'a'进行16进制转换 base 存在时,视 x 为 base
阅读全文
摘要:def get_ip(count='10', start='2001:2:3:4:5:6:7:8'): starts = start.split(':') A = int(starts[0], 16) # int('a',16) 将字符串'a'进行16进制转换 base 存在时,视 x 为 base
阅读全文
摘要:def get_ip(count='10', start='2001:2:3:4:5:6:7:8'): starts = start.split(':') A = int(starts[0], 16) # int('a',16) 将字符串'a'进行16进制转换 base 存在时,视 x 为 base
阅读全文
摘要:import timeimport calendar print('*'*50+str(time.time())+'*'*50)print(time.localtime(time.time()))print(time.asctime(time.localtime(time.time())))prin
阅读全文
摘要:python模块 pip install ipython pip install itchat
阅读全文
摘要:生成主机地址: 1 #!/usr/bin/env python 2 # -*- coding: utf-8 -*- 3 4 def getIP(count=1000, startIP='1.1.1.1'): 5 a1 = int(startIP.split('.')[0]) 6 a2 = int(s
阅读全文
摘要:#!/usr/bin/env python # -*- coding: utf-8 -*- def getIP(count=1000, startIP='1.1.1.1'): a1 = int(startIP.split('.')[0]) a2 = int(startIP.split('.')[1]
阅读全文
摘要:i = 2 while(i < 100): j = 2 while(j <= (i/j)): if not (i % j): break j = j + 1 if(j > i / j): print(i,"是素数") i = i + 1
阅读全文
摘要:# -*- coding: utf-8 -*- with open(r'.\test_data\demo.txt','w',encoding='utf-8') as f: f.write('相对abc') print("*"*50+"相对路径测试end"+"*"*50) with open(r'C:
阅读全文

浙公网安备 33010602011771号