[Solved] Python Count the number of periods (.) there are in the file [duplicate]
try as follow with open(‘file.txt’) as f: file_content = f.read() result = file_content.count(‘.’) result will be the number of periods. 7 solved Python Count the number of periods (.) there are in the file [duplicate]