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)