Iterate over a List of Lists in Python
The following syntax can be used to iterate over a list of lists: Copy my_list = [[“a”, “b”, “c”], [“d”, “e”, “f”], [“g”, “h”, “i”]]for x in my_list: for y in x: print(y) Example of iterating over a list of lists Let’s suppose that you have a list of lists of colors. You can then … Read more