Re: wildcard match with list.index()

2008-11-19 Thread Sion Arrowsmith
jeff [EMAIL PROTECTED] wrote: list [['a', [], []], ['b', [1, 2], []], ['c', [3, 4], [5, 6]]] list.index(['b',[],[]]) ie, would like to match the second element in the list with something where i just know 'b' is the first element, but have no idea what the other elements will be: Traceback

Re: wildcard match with list.index()

2008-11-18 Thread jeff
On Nov 10, 1:59 pm, Arnaud Delobelle [EMAIL PROTECTED] wrote: Mr.SpOOn [EMAIL PROTECTED] writes: Hi, is there any way to search elements in a list using wildcards? I have a list of various elements and I need to search for elements starting with 'no', extract them and put in a new list.

Re: wildcard match with list.index()

2008-11-11 Thread Mr . SpOOn
Thanks, I just have to choose which one to use :) -- http://mail.python.org/mailman/listinfo/python-list

wildcard match with list.index()

2008-11-10 Thread Mr . SpOOn
Hi, is there any way to search elements in a list using wildcards? I have a list of various elements and I need to search for elements starting with 'no', extract them and put in a new list. I was thinking about something like: mylist.index('no*') Of course this doesn't work. --

Re: wildcard match with list.index()

2008-11-10 Thread Grzegorz Staniak
On 10.11.2008, Mr.SpOOn [EMAIL PROTECTED] wroted: is there any way to search elements in a list using wildcards? I have a list of various elements and I need to search for elements starting with 'no', extract them and put in a new list. I was thinking about something like:

Re: wildcard match with list.index()

2008-11-10 Thread Arnaud Delobelle
Mr.SpOOn [EMAIL PROTECTED] writes: Hi, is there any way to search elements in a list using wildcards? I have a list of various elements and I need to search for elements starting with 'no', extract them and put in a new list. I was thinking about something like: mylist.index('no*') Of