On Feb 23, 9:35 pm, collin <chaosm...@gmail.com> wrote:
> 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?

You'd have to get the indexes of the two items and subtract them.
There is an 'index' method on the List object for that.
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to