This tutorial shows you how to use the modulo operator and floor division to split an integer into a list of digits in Python 3. In this video, you learn to implement the algorithm to work for positive integers, and then for nonnegative integers, and finally for all integers (positive, negative, 0).
This video is the new edition of an old video linked below:
• Python 3 Tutorial - Split Integer Into Digits
0:00 Explaining the algorithm
4:58 Splitting a positive integer into a list of digits
6:46 Splitting a nonnegative integer into a list of digits
8:08 Splitting any integer into a list of digits