Convert a number to a list of integers

前端 未结 11 1428
渐次进展
渐次进展 2020-12-03 02:44

How do I write the magic function below?

>>> num = 123
>>> lst = magic(num)
>>>
>>> print lst, type(lst)
[1,         


        
11条回答
提交回复
热议问题