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)        # [[], [], [], [], [], [], [], [], [], []]
 
PREVIOUS NEXT
Tagged: #create #empty #list #lists #python
ADD COMMENT
Topic
Name
5+8 =