Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 2
- 11 22
- 33 44
- b = int(input())
- a = []
- for num in range(b):
- a.append([])
- i = input().split()
- for r in range(len(i)):
- a[num].append(i[r])
- print(a)
- 2 # 1 тест
- 11 22
- 33 44
- 2 # 2 тест
- 11 22 33
- 44 55 66
- [['11', '22'], ['33', '44']] # 1 тест
- [['11', '22', '33'], ['44', '55', '66']] # 2 тест
- In [3]: [input().split() for _ in range(int(input()))]
- 2
- 1 2
- 3 4
- Out[3]: [['1', '2'], ['3', '4']]
- s0 = '''2
- 11 22
- 33 44'''
- (n, s1) = s0.split('n', 1)
- li = map(str.split, s1.split('n', int(n)))
- print(list(li)) # [['11', '22'], ['33', '44']]
Add Comment
Please, Sign In to add comment