1fullstring = "StackAbuse"
2substring = "tack"
3
4if substring in fullstring:
5 print "Found!"
6else:
7 print "Not found!"
1def find_string(string,sub_string):
2 return string.find(sub_string)
3#.find() also accounts for multiple occurence of the substring in the given string
1fullstring = "StackAbuse"
2substring = "tack"
3
4if substring in fullstring:
5 print "Found!"
6else:
7 print "Not found!"
8
1def is_value_in_string(value: str, the_string: str):
2 return value in the_string.lower()