ESR> You're right. But since a string can't be an element of a ESR> string, the case I'm really interested in would still work. KY> It's arguable. A character can indeed be an element of a KY> string, and in Python characters are one-character strings. KY> So this violates KY> x in s <=> there exists i such that s[i] == x KY> You could argue that strings should have special behaviour for KY> "in" to support the common case of finding a substring; then KY> you would have to argue on grounds of "practicality beats KY> purity". And against TOOWTDI: >>> 'cabcd'.find('ab') >= 0 1 >>> 'cabcd'.find('xx') >= 0 0 -Barry
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