Why is converting from an integer to digits through str() faster than a pure Python implementation?

前端 未结 0 1384
孤城傲影
孤城傲影 2021-01-19 16:12

Let\'s say we have an integer n = 123 and want to convert it into constituent digits d = [1, 2, 3]. Among two possible options,

def          


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题