# coding: latin-1 l = [0,0,0] while l [-1] < 10 : print l l [0] += 1 i = 0 while i < len (l)-1 and l [i] == 10 : l [i] = 0 l [i+1] += 1 i += 1