rbt <[EMAIL PROTECTED]> writes:
> Say I have a list that has 3 letters in it:
> 
> ['a', 'b', 'c']
> 
> I want to print all the possible 4 digit combinations of those 3
> letters:

for i in xrange(81):
  print ''.join(['abcd'[j]  
                 for j in [(i//d)%3 for d in (27,9,3,1)]])
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to