Last active
June 6, 2020 09:31
-
-
Save parthvshah/a09a222ebdff6e732755b90573100b26 to your computer and use it in GitHub Desktop.
Input methods for Python
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
# For a string | |
# 'youremywholeworld' | |
a = input() | |
# For single integer input | |
# 9 | |
a = int(input()) | |
# For multiple (small) input | |
# 8 9 | |
a, b = input().split() | |
a = int(a) | |
b = int(b) | |
# For an array | |
# 3 4 8 9 | |
a = list(map(int, input().split())) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment