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
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
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
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]
>
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
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