[1, 2] in [1, 2, 3] returns 0?
sandskyfly at hotmail.com
Sun Aug 26 15:10:37 CEST 2001
Peter Hansen <peter at engcorp.com> wrote in message news:<3B87FDE8.4CE63729 at engcorp.com>...
> >>> lst = [ 1, [1, 2], 2, 3]
> >>> sublst = [1,2]
> >>> sublst in lst
> Given the choice between the two, this one should be considered
> less surprising. Well, with 20-20 hindsight, anyway. :-)
Appreciate all the responses. I did feel incredibly stupid yesterday
until Eric S. Raymond asked something similar on Python-Dev recently
I guess I'm feeling better today...
More information about the Python-list