>>>mylist = [1,2,3,4,1]
>>>mylist.index(1)
0
But note that this only shows the index for the first occurrence of the item.
Bodsda
Sent from my BlackBerry® wireless device
-Original Message-
From: surya k
Sender: tutor-bounces+bodsda=googlemail@python.org
Date: Thu, 8 Dec 2011 20:5
On 08/12/2011 15:28, surya k wrote:
Well, we all know to know the value when we have the index of a list.
But how can we find it in the reverse way... say a listl=[1,2,3,4]
l[0]=1.but how can I find its address with its value 1 ??
help ([])
...
index(...)
L.index(value, [start, [stop]])
On Thu, Dec 8, 2011 at 10:28 AM, surya k wrote:
>
> Well, we all know to know the value when we have the index of a list. But
> how can we find it in the reverse way...
> say a listl=[1,2,3,4]
> l[0]=1.but how can I find its address with its value 1 ??
> __