Created
November 18, 2015 13:52
-
-
Save GaryLee/c3a686dcba67057da924 to your computer and use it in GitHub Desktop.
Short code for matrix input
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
input_round = lambda: range(int(raw_input('\n'))) | |
input_size = lambda: range(int(raw_input('\n'))+1) | |
input_coord = lambda round, count: round if count == 0 else raw_input('').split(' ') | |
print [input_coord(round, count) for round in input_round() for count in input_size()] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment