Skip to content

Instantly share code, notes, and snippets.

@mvoitko
Created November 3, 2019 12:33
Show Gist options
  • Save mvoitko/53e8e70042f6e05134fb909f506c5b54 to your computer and use it in GitHub Desktop.
Save mvoitko/53e8e70042f6e05134fb909f506c5b54 to your computer and use it in GitHub Desktop.
Reading int input for HackerRank
def read_tokens():
return input().strip().split()
def read_ints():
return [int(s) for s in read_tokens()]
a, = read_ints() # 1 int
a, b, c = read_ints() # several
a = read_ints() # list
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment