Below is my code:
n = int(input())
for i in range(n):
d = int(input())
for i in range(d):
a = list(map(int,input().split()))
print(a)
But I want my code to do this, for example:
Suppose d = 4
is my user input
Now, I want (random example) a = [1, 4 , 8, 19]
. That too from user input.
This is an example of the output of. I am not able to frame the question properly. So, here is the desired output:
3 #input for n
2 #input for d
[4,6] #output for a
5 #input for 2nd d
[4,2,1,4,7] #output for a, 5 elements as d = 5
2 #input for last d, as 'n' was 3
[1,9] #(the last array a)