enumerate is easy to use:
...which prints out:
#0: h #1: e #2: l #3: l #4: o
You can use it on just about any iterable sequence.
Please note: This wiki is currently running in test mode after an attack on January 5 2013. All passwords were reset, so you will have to use the password recovery function to get a new password. To edit wiki pages, please log in first. See the wiki attack description page for more details. If you find problems, please report them to the pydotorg-www mailing list.