I was working on flattening this multidimensional list
f_list =[[[1, 2, 3]], [[4, 5, 6]],
[[7, 8, 9]]]
and i did using nested for loops like so
new_l=[]
for sublist in f_list:
for subsublist in sublist:
for i in subsublist:
new_l.append(i)
print(new_l)
but i want to convert it using list comprehension but i am confused on how to go about it. i've read some documentation where it said to take the last bit of the loop to start off and go from top to bottom but, it did not work
new_l =[i for subsublist in f_list for sublist in subsublist for sublist in f_list]
and tried this as well
new_l =[i for subsublist in sublist for subsublist in sublist for sublist in f_list]
i am very confused