Python ProgrammingPython Programming

Python initializing a list of lists

thelist = [[] for i in range(4)]
print(thelist)
Output
[[], [], [], []]