I am playing around with Python and I would like to print each number form 0000 to 9999 but only if the numbers do not repeat itself.
I started like this just to print every number:
for i in range(0000, 10000):
print(f"Checking: {1:04}")
that prints every number up to 9999 and i would like to print each number that does not have a repeated number in them. this was my attempt:
for i in range(0000, 10000):
for n in i:
if i[n] != i[n + 1]
print(f"checking: {i:04}")
and the error that prints is:
Traceback (most recent call last):
File "test.py", line 2, in <module>
for n in i:
TypeError: 'int' object is not iterable
thanks, any tip is appreciated!