Hi,
I want to add the same value to a list:
This code seems to work, but my IDE reports (quite rightly!) that the variable i is unused. Is there a tidier way to approach this?
Thanks in advance.
I want to add the same value to a list:
Code:
singlevalue = 12
numberOfElements = 60
tempList = [singleValue for i in xrange(numberOfElements)]
Thanks in advance.