Home python split the number on the list of numbers

split the number on the list of numbers

Author

Date

Category

From the user, using the Input function, I get a six-digit number.

After that, you need to split it for 6 independent numbers, for example, to the list.

How can this be achieved?

For example, the number 123456 , you need to split on 1, 2, 3, 4, 5, 6


Answer 1, Authority 100%

& gt; & gt; & gt; List (STR (123456))
['1', '2', '3', '4', '5', '6']

Answer 2

a = list (map (int, input ()))
Print (A)

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions