How do I write the magic function below?
magic
>>> num = 123 >>> lst = magic(num) >>> >>> print lst, type(lst) [1,
Just use :
a= str (num) lst = list(a)