摘要:
task3.py with open('data3.txt','r',encoding= 'utf-8') as f: data = f.readlines() d = [eval(line) for line in data[1:]] print('原始数据: ') print(d) t = [] 阅读全文
摘要:
task1.py import random print('用列表存储随机整数: ') ls = [random.randint(1, 100) for i in range(5)] print(ls) print('\n用集合存储随机整数: ') s1 = {random.randint(1,10 阅读全文
摘要:
task1.pyx = list(range(10)) print('整数输出1: ', end='') for i in x: print(i, end=' ') print('\n整数输出2: ', end='') for i in x: print(f'{i:02d}', end='-') p 阅读全文