Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print(*zip(map(lambda x: list(map(int, input().split())), range(int(input())))))
- 2
- 0 0
- 1 1
- (0, 1) (0, 1)
- ([0, 0],) ([1, 1],)
- print(*zip(*map(lambda x: list(map(int, input().split())), range(int(input())))))
- # ^ <--- NOTE
- (0, 1) (0, 1)
- In [159]: list(zip([[0, 0], [1,1]]))
- Out[159]: [([0, 0],), ([1, 1],)] # то что получилось
- In [160]: list(zip([0, 0], [1,1]))
- Out[160]: [(0, 1), (0, 1)] # то что нужно получить
- In [161]: list(zip(*[[0, 0], [1,1]])) # решение
- Out[161]: [(0, 1), (0, 1)]
Add Comment
Please, Sign In to add comment