print out all 4-digit numbers in old way
()
| 3 | |
| 4 | # ALL the combinations of 4 digit combo |
| 5 | def four_digit_combinations(): |
| 6 | """print out all 4-digit numbers in old way""" |
| 7 | numbers = [] |
| 8 | for code in range(10000): |
| 9 | code = str(code).zfill(4) |
| 10 | print(code) |
| 11 | numbers.append(code) |
| 12 | |
| 13 | |
| 14 | # Same as above but more pythonic |