1.tong ji letter demo mport sys def tongjiword(): fi =open(paht,'r') cont=fi.read() wl={} for line in fi.read(): lin =line.trip() for i in range(len(lin)): if lin(i) not in wl: wl[lin(i)] =0 wl[line(i)] +=1 temp = sorted(wl.items,key=lambda:d:d(1),re…