How to create an empty list of lists in Python

1 Answer

0 votes
lst = [[] for _ in range(4)]

print(lst)



'''
run:

[[], [], [], []]

'''

 



answered Mar 16, 2023 by avibootz
...