Build a generator that yields the decimal digits of any integer one by one.
Constraints
Example
>>> list(digit_expansion(1234)) [1, 2, 3, 4] >>> list(digit_expansion(0)) [0] >>> list(digit_expansion(7)) [7] >>> list(digit_expansion(9001)) [9, 0, 0, 1]
Recent Submissions
No submissions yet — hit Run Tests to try!
Hints