摘要:
def is_valid(x): if len(x)!=18: return False for i in x: if not (i.isdigit() or i=='X'): return False else: return True with open('data3_id.txt','r',e 阅读全文
摘要:
实验五-3with open('data3.txt','r',encoding='utf-8') as f : with open('data3_processed.txt', 'w', encoding='utf-8') as f1: data=f.read().strip().split('\n 阅读全文
摘要:
# task1.py import random print('用列表存储随机整数: ') Is = [random.randint(1,100)for i in range(5)] print(Is) print('\n用集合存储随机整数:') s1 = {random.randint(1,100 阅读全文