replicate

Create list of single item repeated N times

Create list of single item repeated N times Question: I want to create a series of lists, all of varying lengths. Each list will contain the same element e, repeated n times (where n = length of the list). How do I create the lists, without using a list comprehension [e for number in xrange(n)] …

Total answers: 9