On Mon, Sep 24, 2012 at 2:36 AM, jimbo1qaz <jimmyli1...@gmail.com> wrote: > Am I missing something obvious, or do I have to manually put in a counter in > the for loops? That's a very basic request, but I couldn't find anything in > the documentation.
You mean, if you want the indices as well as the values? Try the enumerate() function: my_list = ["foo", "bar", "quux"] for idx,val in enumerate(my_list): print("Element "+str(idx)+" is: "+val) ChrisA -- http://mail.python.org/mailman/listinfo/python-list