What is the quickest and cleanest way to convert an integer into a list?
integer
list
For example, change 132 into [1,3,2] an
132
[1,3,2]
n = int(raw_input("n= ")) def int_to_list(n): l = [] while n != 0: l = [n % 10] + l n = n // 10 return l print int_to_list(n)