Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

list comprehension

list = [[2,4,6,8]]
matrix = [[row[i] for row in list] for i in range(4)]
print(matrix)
Source by pythonguides.com #
 
PREVIOUS NEXT
Tagged: #list #comprehension
ADD COMMENT
Topic
Name
1+8 =