1myString = "<text contains this>"
2myOtherString = "AnotherString"
3
4# Casting to string is not needed but it's good practice
5# to check for errors
6
7if str(myString) in str(myOtherString):
8 # Do Something
9else:
10 # myOtherString didn't contain myString
11
1string = 'ex@mple'
2
3if '@' in string:
4 return True
5
6if '@' not in string:
7 return False