r/learnpython • u/bkabartsy • Sep 26 '24
Empty strings - am i tripping?
>>> '' in 'abc'
Truecan someone explain? (python 3.12.6)
1
Upvotes
r/learnpython • u/bkabartsy • Sep 26 '24
>>> '' in 'abc'
Truecan someone explain? (python 3.12.6)
53
u/Binary101010 Sep 26 '24
Directly from the Python docs:
https://docs.python.org/3/reference/expressions.html#membership-test-operations