Home > other >  Bosses, could you tell me how to write in the items while loop for all the items of the text, the yo
Bosses, could you tell me how to write in the items while loop for all the items of the text, the yo

Time:09-24

Bosses, please speak a little detail, it is better to tell me what to write, I stupid, thank you

CodePudding user response:

Use for good?

For x in the items: print (x)

Why do you want to use the while

CodePudding user response:

L=[1, 2, 3, 4]
Length=len (l)

While (length!=0) :

# # value=https://bbs.csdn.net/topics/l.pop (length) of elements in the reverse order take out l, the values will delete the elements in the l
# value=https://bbs.csdn.net/topics/l] [length - 1 # elements on the reverse of the l
Value=https://bbs.csdn.net/topics/l [len (l) - length] # out positive sequence of elements in the l
Length -=1
Print (value)