Programme Python pour compter les occurrences d'un mot dans un fichier texte

object reference to the file
file = open("C:\workspace\python\data.txt", "r")
#read content of file to string
data = file.read()
#get number of occurrences of the substring in the string
occurrences = data.count("python")
print('Number of occurrences of the word :', occurrences)
Crowded Cassowary