Dodaj stałą do listy Python
>>> L = [1]*5
>>> [x+1 for x in L]
[2, 2, 2, 2, 2]
>>>
Naughty Nightingale
>>> L = [1]*5
>>> [x+1 for x in L]
[2, 2, 2, 2, 2]
>>>
import numpy
a = [1, 1, 1 ,1, 1]
ar = numpy.array(a)
print ar + 2