problem24.py 153 B

123456
  1. from itertools import permutations
  2. for i, p in enumerate(permutations(range(10))):
  3. if i == 999999:
  4. print ''.join(map(str, p))
  5. break