On 04/02/15 13:06, Raúl Cumplido wrote:
There is a repeat argument on the product function that is used
exactly for what you want to do:
>>> for s in product(var, repeat=2)
print ''.join(s)
Good catch, I should have remembered that.
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos
_______________________________________________
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor