Python 3 Tutorial - Split Integer Into Digits

preview_player
Показать описание
This is an old version of this video. Check out the new video below:

CHECK OUT MY NEW CHANNEL!

This tutorial teaches how to split an integer into individual digits and store them in a list.

NOTE: Throughout the video, I make references to "arrays". These are known as "lists" in Python.
Рекомендации по теме
Комментарии
Автор

please, could you explain the character before digits in print? the * it does not work for me

aminraeisi
Автор

brooo thank you so much, i had trouble understanding this but you have helped me alot! Thanks!

delvstudio
Автор

can you make a video of the inverse ie obtaining the numbers and making then into a number

tejasbalamukesh
Автор

How to sum the first and last digit of the reverse integer?

azreenamirah
Автор

thx dude, you helped me solve the Leetcode question #1281

Jimmy-zwve
Автор

Thank you for your help, coz I have been looking for this since yesterday to find second digit, but I got it from you channel.

jumabozorov
Автор

Hey man! When I use the same logic, only the first element of the list is getting displayed. Please help me..

the_bruised_bard
Автор

so mod in python is the DIV library routine in pseudocode?

farhanrahman
Автор

Bro pls tell how separate the odd and even number in digits in pythonn

balajisubramanian
Автор

What if the the number was -12345678? How would you keep the -1?

javonnii
Автор

What's the simpler, less mathmatical way?

jessicawade
Автор

num=1234589
l=[i for i in str(num)] the string method

pythoneer
Автор

It's not like 1024; without 0 its working fine :-)

easinwebpro
Автор

Great tutorial but i need this in java :(

Youngballer
Автор

or

my_int = 123456789
my_list = [int(x) for x in str(my_int)]
print(my_list)

chrisnorthall