How to find the frequency of a particular word in Python?

Hello Everyone,
This is Santhosh
I have written a code to find the frequency of a particular letter in the Paragraph.
For Ex:

In the Era of 2021 Data Science Plays a crucial role in getting Data Insights for validating business predictions and the demand for Data Scientists is increasing day-to-day. We can design predictions and models using Data Science.

a="In the Era of 2021 Data Science Plays a crucial role in getting Data Insights for validating business predictions and the demand for Data Scientists is increasing day-to-day. We can design predictions and models using Data Science."
b='e'
count=0
for i in a:
    if i==b:
        count+=1
print(count)

The answer is 17 in the above case

How Can I able to get the frequency of “Data Science” in the whole paragraph.In this case the answer should 2 for the Data Science keyword

Thank You
Waiting for your responses

1 Like

a=“In the Era of 2021 Data Science Plays a crucial role in getting Data Insights for validating business predictions and the demand for Data Scientists is increasing day-to-day. We can design predictions and models using Data Science.”
b=‘e’
count=0
for i in a:
if i==Data Science:
count+=1
print(count)