If you just append the values from your initial input line to lst
it allows you to take each line and make it into a 2D list
>>> lst = []
>>> lst.append([int(y) for y in input().split()])
5 2
>>> lst.append([int(y) for y in input().split()])
6 1
>>> lst
[[5, 2], [6, 1]]
>>>
However, you mentioned multiple lines so I assume you want to take all the input at once. Using this answer, I adapted the code to append each line as a list (as above). Input will only stop when a Ctrl-D
(posix) or Ctrl-Z
(windows) character is found
>>> lst = []
>>> while True:
... try:
... line = input()
... except EOFError:
... break
... lst.append([int(y) for y in line.split()])
...
5 2
6 1
7 3
4 2
10 5
12 4
^Z
>>> lst
[[5, 2], [6, 1], [7, 3], [4, 2], [10, 5], [12, 4]]
>>>
Hope this helps!
EDIT: Thought I would add, this could then be used later by iterating over the outer list
>>> for item in lst:
... print(item)
...
[5, 2]
[6, 1]
[7, 3]
[4, 2]
[10, 5]
[12, 4]
>>>