newbie: find position of item in a list
Michael Hudson
mwh at python.net
Wed Oct 2 10:31:14 EDT 2002
Alexander Eisenhuth <stacom at stacom-software.de> writes:
> Hallo Again,
>
> i wonder weather there is no expression of finding the position of a element is a list like:
>
> l = ['a', 'b', 'c', 'd', 'e']
>
> l.find('b')
> >> 1
>
> Have I overseen something in the documentation to python ?
.index()?
M.
--
I have no disaster recovery plan for black holes, I'm afraid. Also
please be aware that if it one looks imminent I will be out rioting
and setting fire to McDonalds (always wanted to do that) and
probably not reading email anyway. -- Dan Barlow
More information about the Python-list
mailing list