Created
November 3, 2019 12:33
-
-
Save mvoitko/53e8e70042f6e05134fb909f506c5b54 to your computer and use it in GitHub Desktop.
Reading int input for HackerRank
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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