05 2022 档案

摘要:#test-3.py def is_valid(m): if len(m)==18 and m.isdigit(): return 'True' elif len(m)==18 and m[-1]=='X': return 'True' else: return 'False' with open( 阅读全文
posted @ 2022-05-22 09:03 刘思彤、 阅读(29) 评论(2) 推荐(0) 编辑
摘要:#tesk3.py with open('data3.txt','r+', encoding='UTF-8') as f: Z=[] Y=[] x=[] for i in f: x.append(i.strip('\n')) newx=x[1:11] for i in newx: y=float(i 阅读全文
posted @ 2022-05-15 14:40 刘思彤、 阅读(23) 评论(1) 推荐(0) 编辑
摘要:恢复内容开始 恢复内容开始 恢复内容开始 #test1.py print(sum) sum = 42 print(sum) def inc(n): sum = n+1 print(sum) return sum sum = inc(7) + inc(7) print(sum) 不是一个变量名。 li 阅读全文
posted @ 2022-05-08 11:33 刘思彤、 阅读(41) 评论(1) 推荐(0) 编辑