When I need to add several identical items to the list I use list.extend:
a = [\'a\', \'b\', \'c\'] a.extend([\'d\']*3)
Result
>>> a = [['a',2], ['b',2], ['c',1]] >>> [i for i, n in a for k in range(n)] ['a', 'a', 'b', 'b', 'c']