Nick Craig-Wood wrote:
Steven Bethard <[EMAIL PROTECTED]> wrote:
py> orders = [Viking().order()] * 7
py> ', '.join(orders)
'Spam, Spam, Spam, Spam, Spam, Spam, Spam'

Thats still one Viking making 7 orders surely?

So you want this...

orders = [ Viking().order() for _ in range(7) ]

Right, right. Thanks for the correction! This is why I never use the * operator on lists. ;)


Steve
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to