how can I take this list below as an input in python directly.
a = [[1, 3, 4], [5, 2, 9], [8, 7, 6]]
Do I have to use input() function and then arrange them using a for loop or there is any method to take it directly as input.
x=int(input("enter the size of list"))
y= int(input("enter the size of sublist"))
list1=[]
sublist=[]
for i in range(x):
for j in range(y):
sublist.append(input())
list1.append(sublist)
sublist=[]
print (list1)
Do I have to use this code only to take nested list as input or there is any other direct method to take it as input.