You can use in operator to access sub strings in Python.
in returns boolean value either True or False.
For Example:
statement = 'I am answering this question'
'I' in statement
Output
True
'not' in statement
Output
False
Another way is to use indexing str.find (which returns -1 on failure and returns the index position of the string on success )
start = 0
end = len(statement)
statement.find('not', start, end)
Output
-1
statement.find('I', start, end)
Output
0