►
Run
#string s1 = 'Hello World' #sub-string s2 = 'rld' #str.endswith(sub) b = s1.endswith(s2) print(b) #output: True
Output