'How to take multiple input in multiple line in python

I have to take multiple input in multiple lines

for example

n=int(input())

I have to take n input in n line and each line take multiple input

if n=5
then I have to take 5 input in 5  line
a=[1,2,3]
b=[1,2,3]
c=[1,2,3]
d=[1,2,3]
e=[1,2,3]

like this is just an example.



Solution 1:[1]

This would be what you need...

n = int(input())
for i in range(n):
    exec(input())
print(a, b, c, d, e)

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 hochae