For loop

just wondering why this for loop doesnt work i read the example and it seem pretty straight forward.

single_digits=[0,1,2,3,4,5,6,7,8,9,]
for single_digit in single_digits

print(single_digit)

I edited your post to format your code. Please see How do I format code in my posts?
Your for loop is missing an important element, and is empty (no code inside the loop). Both issues should throw syntax errors. You may need to take a closer look at the example you mentioned.

whwhat does make sense is it wants the element to be named item which I don’t understand why it can be single digit

solved the issue thanks for your help

1 Like

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.