TypeError: 'file' object has no attribute '__getitem__'
first_line = next(f)
second_line = next(f)
next_line_that_starts_with_0 = next(line for line in f if line.startswith('0'))
Python文件变量-这是什么?
TypeError: 'file' object has no attribute '__getitem__'
first_line = next(f)
second_line = next(f)
next_line_that_starts_with_0 = next(line for line in f if line.startswith('0'))