list.index() like...but returning lists (for avoiding '0' on multiples hits)
Srinath Avadhanula
srinathava_news at yahoo.com
Mon Dec 22 09:00:04 EST 2003
More information about the Python-list mailing list
Mon Dec 22 09:00:04 EST 2003
- Previous message (by thread): list.index() like...but returning lists (for avoiding '0' on multiples hits)
- Next message (by thread): list.index() like...but returning lists (for avoiding '0' on multiples hits)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
> but their results is not giving me the answer that i looking for...So, here i > go...when i have myList = [2,4,2,0] ...myList.index(2) returns 0 (python > 2.2)....There is a built-in function-method that returns [0,2]? > This works... >>> a = [1,2,3,4] >>> a[:2] [1, 2] >>> Srinath
- Previous message (by thread): list.index() like...but returning lists (for avoiding '0' on multiples hits)
- Next message (by thread): list.index() like...but returning lists (for avoiding '0' on multiples hits)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list