It is strange to see a piece of code using the syntax 'str in str in str', for example:
>>> 'test' in 'testtest' in 'testtesttest' True >>> 'test' in 'testtest' in 'tb3' False >>> 'test' in 'testtesta' in 'testtesttest' False >>> 'test' in ('testtest' in 'testtesttest') Traceback (most recent call last): File "<input>", line 1, in <module> 'test' in ('testtest' in 'testtesttest') TypeError: argument of type 'bool' is not iterable
It seems that "in ... in ..." is like a comparison of "<... <...". But fast Google did not lead me to official answers. Any help?
source share