Append the same value multiple times to a list
append, list, python
Solution
To add v, n times, to l:
l += n * [v]
Problem
To make my program more beautiful instead of ugly, I am trying to find a more pythonic way of adding a single value multiple times to a list. I now use a loop, but I create a variable I do not use. ``` l = []; n = 5; v = 0.5 for i in xrange(n): l.append(v) ``` Any ideas?