摘要:
1 def v(x): 2 z=0 3 if len(x)!=18: 4 return False 5 else: 6 for i in x: 7 if ord(i) < 48 or 87>=ord(i)>57 or ord(i)>88: 8 z+=1 9 if z!=0: 10 return Fa 阅读全文
摘要:
1 with open ('data3.txt','r',encoding='utf-8')as f: 2 a=f.readlines() 3 del a[0] 4 b=[] 5 c=[] 6 for i in a: 7 if float(i.replace('\n',''))-int(float( 阅读全文
摘要:
1import random print('用列表存储随机整数:') ls = [random.randint(1,100) for i in range(5)] print(ls) print('\n用集合存储随机整数:') s1 = {random.randint(1,100) for i in 阅读全文