Re: check if the values are prensent in a list of values

2008-09-09 Thread flit
On 9 set, 15:13, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > Matt Nordhoff a écrit : > (snip) > > > I'm not judging whether this is a good solution or not, but that's a > > silly use of a dict. > > Yeps, but a somewhat common one in code predating the apparition of sets > as builtin type. Tha

Re: check if the values are prensent in a list of values

2008-09-09 Thread Bruno Desthuilliers
Matt Nordhoff a écrit : (snip) I'm not judging whether this is a good solution or not, but that's a silly use of a dict. Yeps, but a somewhat common one in code predating the apparition of sets as builtin type. -- http://mail.python.org/mailman/listinfo/python-list

Re: check if the values are prensent in a list of values

2008-09-09 Thread Matt Nordhoff
Emile van Sebille wrote: > flit wrote: >> Hello All, >> >> I will appreciate the help from the more skillfull pythonistas.. >> >> I have a small app that generates a sequence like >> >> 00341 >> 01741 >> 03254 > > Consider using a dict with sorted tuple keys, eg > > d = {} > > for seq in ['00341

Re: check if the values are prensent in a list of values

2008-09-09 Thread George Sakkis
On Sep 9, 2:04 pm, flit <[EMAIL PROTECTED]> wrote: > Hello All, > > I will appreciate the help from the more skillfull pythonistas.. > > I have a small app that generates a sequence like > > 00341 > 01741 > 03254 > > This values I am putting in a list. > > So I have a list = [00341,01741,03254] >

Re: check if the values are prensent in a list of values

2008-09-09 Thread Emile van Sebille
flit wrote: Hello All, I will appreciate the help from the more skillfull pythonistas.. I have a small app that generates a sequence like 00341 01741 03254 Consider using a dict with sorted tuple keys, eg d = {} for seq in ['00341','01741','03254']: ky = list(seq) ky.sort() d[t

check if the values are prensent in a list of values

2008-09-09 Thread flit
Hello All, I will appreciate the help from the more skillfull pythonistas.. I have a small app that generates a sequence like 00341 01741 03254 This values I am putting in a list. So I have a list = [00341,01741,03254] after the programs find the sequence 03401 this sequence is "new" so it ap