How do I count the distance between strings in a list?

collin chaosmage at gmail.com
Tue Feb 24 00:35:21 EST 2009


For example, if I were to have the code

randomlist = ["1", "2", "3", "4"]

And I want to count the distance between strings "1" and "4" which is
3, what command can I use to do this?



More information about the Python-list mailing list