DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
List Comprehension generate a list
# generate a list li = [ i+1 for i in [1,2,3] ] print(li) # [2, 3, 4]
Source by xahlee.info #
PREVIOUS
NEXT
Tagged:
#List
#Comprehension
#generate
#list
ADD COMMENT
Topic
COMMENT
Name
6+6 =
Submit