摘要:
import random def func(money,num): money = money*100 ret= random.sample(range(1,money),num-1) ret.sort() ret.insert(0,0) ret.append(money) for i in ra 阅读全文
posted @ 2021-01-21 14:33
苦行僧冬*婷
阅读(41)
评论(0)
推荐(0)
摘要:
fei_yong = 0 shop_car ={} #键 == 列表的索引 值 == 商品的数量 money = input('请输入金钱:') if money.isdigit(): #这是真钱 while 1: for i in range(len(goods)): print(i+1,good 阅读全文
posted @ 2021-01-21 14:32
苦行僧冬*婷
阅读(52)
评论(0)
推荐(0)
摘要:
from urllib.request import urlopen,Request import re # 返回页面内容 # 取页 def getPage(num): url = 'https://movie.douban.com/top250?start=%s&filter='%num*25 h 阅读全文
posted @ 2021-01-21 11:44
苦行僧冬*婷
阅读(60)
评论(0)
推荐(0)
摘要:
import random #完整版 函数生成验证码 字母或数字字母验证码 def code(n=6,alpha = True): s ='' for i in range(n): num = str(random.randint(0,9)) if alpha: alpha_upper = chr( 阅读全文
posted @ 2021-01-21 11:42
苦行僧冬*婷
阅读(117)
评论(0)
推荐(0)
摘要:
#1.写一个函数如果是py文件就执行,如果是文件夹就执行文件夹下的py文件 #注意 文件路径不能有空格和中文,同一时间执行多台电脑文件 def func(path): if os.path.isfile(path) and path.endswith('.py'): os.system('pytho 阅读全文
posted @ 2021-01-21 11:40
苦行僧冬*婷
阅读(70)
评论(0)
推荐(0)

浙公网安备 33010602011771号