'<char> in <string>' works, why doesnt '<string> in <string>'?
damien morton
morton at dennisinter.com
Fri Mar 8 18:38:51 EST 2002
Python 2.2 (#28, Dec 21 2001, 12:21:22) [MSC 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> 'c' in 'the quick brown fox'
1
>>> 'fox' in 'the quick brown fox'
Traceback (most recent call last):
File "<stdin>", line 1, in ?
TypeError: 'in <string>' requires character as left operand
is this by design?
is there any reason why '<string> in <string>' shouldnt work?
More information about the Python-list
mailing list