# -*- coding: utf-8 -*-
# wordcount12.py
f = open("D:/htex/pythonbk/codesdata/대한민국헌법.txt", "r", 
         encoding='utf-8')
counter = 0
for line in f:
    lcounter = line.count("대통령") 
    if lcounter > 0: print(line)
    counter = counter + lcounter
f.close()
print (counter)