#coding='utf-8'# import re import os def get_list(): list_file=[] for f in os.listdir(): if f.endswith('.py'): list_file.append(f) else : pass return list_file def get_read(): dict={} count=0 for x in get_list(): f=open(x,'rb') for line in f.readline…