reading any number of lines of data code example
Example: reading any number of lines of data
try:
while True:
inp = raw_input()
if inp != "":
# Stuff to be done
else:
break
except EOFError:
pass
try:
while True:
inp = raw_input()
if inp != "":
# Stuff to be done
else:
break
except EOFError:
pass