# Remove all the .pyc files under ../Lib.defdeltree(root):importosfromos.pathimportjoinnpyc=0forroot,dirs,filesinos.walk(root):fornameinfiles:# to be thoroughifname.endswith(('.pyc','.pyo')):npyc+=1os.remove(join(root,name))returnnpycnpyc=deltree("../Lib")print(npyc,".pyc deleted")