# Finding a substring in Python

You can simply use in to find out if a string contains another string:

line = "A license for my pet fish, Eric."

Use find() to get the position of the substring:
pos = line.find('license')