I was wondering, if I had nested_list = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
how would I be able to break the loop and only storing the items in each of the nested lists, what I mean by loop is that when I try:
result = [[value_1 for value_1 in a_list] for a_list in nested_list]
The only thing result will have is...well the exact list we started with :/. So what would be a way of storing the items like this [1, 2, 3, 4, 5, 6, 7, 8, 9]
using a list comprehension on nested_list
. I repeat, a list comprehension, not a 'for loop'.