Sie werden an einem Dateipfad P und der Zeichenfolge S in der Befehlszeile übergeben. Ausgabe der Häufigkeit, mit der die Zeichenfolge S in der Datei P erscheint. P.

You will be passed a file path P and string S on the command line. Output the number of times the string S appears in the file P.

file = open(P, 'r')
ptext = file.read()
print(ptext.count(S))
file.close()
Suspended Suspense