[Solved] Python Count the number of periods (.) there are in the file [duplicate]
[ad_1] 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 [ad_2] solved Python Count the number of periods (.) there are in the file [duplicate]