Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

create an empty list of lists in python

if __name__ == '__main__':
 
    n = 10
    a = [[] for x in range(n)]
    print(a)        # [[], [], [], [], [], [], [], [], [], []]
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #create #empty #list #lists #python
ADD COMMENT
Topic
Name
9+1 =