I’m trying to write a code, and I want to ask you how can I ask a while loop to repeat untill it finds a word, in my case END on the list, for example.
L=[]
while "END" (not) in L :
L=L.append(something)
Ask me if you don’t understand what I mean.
Your code as written will work fine, except that
list.append()returns None, and modifies the list in place; don’t assign it back to L: