Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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