Tweeted By @python_tip
One of my favorite things in Python. Testing if a string A contains a substring B is just "B in A", for example,
— Daily Python Tip (@python_tip) September 24, 2018
>>> x = 'hello'
>>> y = 'll'
>>> y in x
True#pythontip
One of my favorite things in Python. Testing if a string A contains a substring B is just "B in A", for example,
— Daily Python Tip (@python_tip) September 24, 2018
>>> x = 'hello'
>>> y = 'll'
>>> y in x
True#pythontip