Monday, May 25, 2020

Python:How to convert a number into a list of its digits

Let the number be 'n',

then

l=[int(x) for x in str(n)]


No comments:

Post a Comment

Derivatives stock list at NSE

Complete FNO stock list at NSE. ABB India Ltd ACC Ltd APL Apollo Tubes Ltd AU Small Finance Bank Ltd Aarti Industries Ltd Abbott India Ltd A...