On Mon, 23 Feb 2009 21:35:21 -0800, collin 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?
This question is ambiguous. It could mean: int("4") - int("1") => 3 ord("4") - ord("1") => 3 randomlist.index("4") - randomlist.index("1") => 3 and possible more as well. Perhaps you should explain what you want to do. What do you mean by "distance between strings", and is it important that they are in a list? -- Steven -- http://mail.python.org/mailman/listinfo/python-list