DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
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
COMMENT
Name
7+1 =
Submit