dimanche 6 décembre 2020

list of words automatically skipping "else" string [closed]

I have the following code:

    text = ['did', 'anyone', 'else', 'discover', 'that', 'the', 'turbulent', 'skin']
    print(text)
    for k in text:
        print(k)

and the output is currently:

['did', 'anyone', 'else', 'discover', 'that', 'the', 'turbulent', 'skin']
did
anyone
discover
the
turbulent
skin

The first print appears to work, but in the for loop it is not including "else" or "that". Why is it skipping over them in the for loop? Beyond that, how do I make it include 'else' and 'that'?

Aucun commentaire:

Enregistrer un commentaire