What is the output of print('th' in 'Python') in Python?
print('th' in 'Python')
Correct answer
C. True
12 views
C. True
12 views
The in operator tests substring membership.
Asked in: Python Interview Strings
https://docs.python.org/3/library/stdtypes.html#string-methodsNot sure why the answer is C? Ask here and get an explanation.