标签: python python-2.7 for-loop input readlines
有没有办法可以有效地从输入中读取每两行?所以,在
data = fileinput.input() # Now, instead of doing for line in data: pass # I need to do for (every block of two lines in data): pass
我正在使用Python 2.