模块,
怎么调用模块的方法,
不用from module import * 直接 import module from sayhello import logger,name print(name) logger() 直接调用name,logger()方法
随机验证码,
#!/usr/bin/env python import random checkcode='' for i in range(5): current=random.randrange(0,5) if current==i: tmp=chr(random.randint(65,90)) else: tmp=random.randint(0,9) checkcode+=str(tmp) print(checkcode)
浙公网安备 33010602011771号