Skip to content

Instantly share code, notes, and snippets.

@ejmg
Created November 3, 2016 06:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ejmg/36c6c6a83fc8ee88456c5baf817d482e to your computer and use it in GitHub Desktop.
Save ejmg/36c6c6a83fc8ee88456c5baf817d482e to your computer and use it in GitHub Desktop.
get an unknown number of lines of input
try:
while True:
inp = input()
if inp != "":
# code
else:
break
except EOFError:
pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment