1fullstring = "StackAbuse"
2substring = "tack"
3
4if fullstring.find(substring) != -1:
5 print "Found!"
6else:
7 print "Not found!"
8
1# string [start:end:step]
2string = "freeCodeCamp"
3print(string[0:len(string)-1]) # freeCodeCam
4print(string[0:5]) # freeC
5print(string[2:6]) # eeCo
6print(string[-1]) # p
7print(string[-5:]) # eCamp
8print(string[1:-4]) # reeCode
9print(string[-5:-2]) # eCa
10print(string[::2]) # feCdCm
1def is_value_in_string(value: str, the_string: str):
2 return value in the_string.lower()