Hacker News new | ask | show | jobs
by ff0066mote 5171 days ago
I would have liked to have seen mention of this while loop instead of the index-based one.

    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.