A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2001-April/014399.html below:

[Python-Dev] Suirprise!

[Python-Dev] Suirprise! [Python-Dev] Suirprise!Tim Peters tim.one@home.com
Sat, 21 Apr 2001 05:51:42 -0400
I just stared at this a long time:

>>> 'a' in 'a'  # fine
1
>>> 'a' in 'a' == 1  # what?
0
>>> 'a' in 'b'  # fine
0
>>> 'a' in 'b' == 0  # what?
0
>>>

It's "correct".  I've been using Python longer than Guido <wink>, and I'm
amazed this is the first time I got bit by this!  Here's a hint:

>>> 'a' in 'a' == 'a'
1
>>>

thank-god-for-dis.dis-ly y'rs  - tim




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4