►
Run
# string s1 = "Hello World. Hello User." #sub-string s2 = "Hello" #str.count(sub) count = s1.count(s2) print(count) #output: 2
Output