SyntaxFix
Write A Post
Hire A Developer
Questions
if you want to operate with list of numbers it is better to use NumPy arrays:
import numpy a = [1, 1, 1 ,1, 1] ar = numpy.array(a) print ar + 2
gives
[3, 3, 3, 3, 3]