Hi!
I want to convert the digites of an integer number to a list?!
Convert the digites of an integer number to a list?!
4 Answers
Know the answer? Post it. Somebody with the same question will find it here.
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.

Does this work?
int[] digits = [mynumbers].ToString().ToCharArray().Select(Convert.ToInt32).ToArray();

num=1234567
res = list(map(int, str(num)))
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Rajanikant HawaldarRank #110 · 20.2K reputationPosted Aug 29, 2021, 4:55 AM EDT