mwilson at the-wire.com
Tue Jul 8 02:41:20 CEST 2008
Ben Finney wrote:
> "David C. Ullrich" <dullrich at sprynet.com> writes:
>> >>> 'ab' in 'abc'
>> >>> [1,2] in [1,2,3]
>> Is there a reason for the inconsistency?
> Probably. The special behaviour of string types was changed in Python
> 2.3, according to that document.
As it stands, you'd get
[1,2] in [1,2,3] == False
[1,2] in [1, [1,2], 3] == True
This could be a good thing.
More information about the Python-list