by ff0066mote · 14y ago · 0 comments
while my_list:
v = my_list.pop(0)
print v
Although it doesn't fit the theme of the others because it consumes the list, it is certainly a more natural use of "while" to loop over a list.No comments yet.