Hi!
I want to convert the digites of an integer number to a list?!
Loading
Hi!
I want to convert the digites of an integer number to a list?!
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.

num=1234567
res = list(map(int, str(num)))

Does this work?
int[] digits = [mynumbers].ToString().ToCharArray().Select(Convert.ToInt32).ToArray();
Rajanikant HawaldarPosted Aug 29, 2021, 8:55 AM