DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
add a constant to a list python
>>> L = [1]*5 >>> [x+1 for x in L] [2, 2, 2, 2, 2] >>>
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#add
#constant
#list
#python
ADD COMMENT
Topic
COMMENT
Name
7+7 =
Submit