I tried this but it does not work:
c=0
file_path ="file.txt"
with open (file_path) as file_object :
for line in file_object:
print(len(line))
for word in line :
if word == "Python":
c+= 1
print(c)