摘要:
方法1 2 3 阅读全文
摘要:
1 def read_data(): 2 with open("test","r",encoding="utf-8") as f : 3 for data in f: 4 yield data 5 6 g = read_data() 7 8 all_population = sum(eval(dt) 阅读全文
摘要:
1 f = open("text_file.txt","rb" ) 2 3 for ln in f: 4 offs = -10 5 while True: 6 print(offs) 7 f.seek(offs,2) 8 data = f.readlines() 9 if len(data) > 1 阅读全文
摘要:
1 def count_and_sum(start,end,a=0,b=0): 2 if start == end: 3 return a,b 4 5 if start%3 == 0 and start%7 == 0: 6 a += 1 7 b += start 8 9 return count_a 阅读全文