Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

create list

# create lists
x = [i for i in range(5)]   # create list
print(x)
y = [[i] for i in range(5)] # create nested list
print(y)
z = [[x, y] for x,y in zip(range(5), range(5,10))]  # create nested list
print(z)
Source by xahlee.info #
 
PREVIOUS NEXT
Tagged: #create #list
ADD COMMENT
Topic
Name
5+7 =