everyone. I am a beginner in Python and I have a question about what words can follow keywords 'for in' in Python?
For example, I define 3 functions here.
def showallwords(wordlist):
for word in wordlist:
print(word)
def showallwordsinline(wordlist):
for line in wordlist:
print(line)
def printcorrectletters():
x=-1
for letters in correctanswer:
for letters2 in userinput:
if letters == letters2:
x = x+1
break
return x
I can put word, line and letter after 'for'. So, these functions have different meaning. Therefore, what kind of or what words can follow 'for' here? Thanks a lot!