[Solved] I have an error and due to lack of knowledge i dont no how fix this: “Traceback (most recent call last): File “”, line 8, in [closed]


You can use range() instead.

l = list(range(1,100))
print(l)
k = []
for i in l:
    if i%10==8:
        k.append(i)
print(k)

solved I have an error and due to lack of knowledge i dont no how fix this: “Traceback (most recent call last): File ““, line 8, in [closed]