Last active
March 23, 2018 10:08
-
-
Save mwrites/291058f6b4ca9df08f989f1ce91aa11d to your computer and use it in GitHub Desktop.
Reading input in python
This file contains hidden or 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
# Create array from lines of separated values such as 1 2 3 | |
arr = list(map(int, input().strip().split(' '))) | |
import sys | |
def read_in(): | |
return [x.strip() for x in sys.stdin] | |
lines = read_in() | |
print(lines) | |
lines = input() | |
for i in range(int(lines)): | |
line = input() | |
print(line) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment