import os
from time import time
from pathlib import Path
p='.'
result=[os.remove(file) for file in (os.path.join(path, file) for path, _, files in os.walk(p) for file in files) if os.stat(file).st_mtime < time() - 7 * 86400]
print(result)
aW1wb3J0IG9zCmZyb20gdGltZSBpbXBvcnQgdGltZQpmcm9tIHBhdGhsaWIgaW1wb3J0IFBhdGgKCnA9Jy4nCnJlc3VsdD1bb3MucmVtb3ZlKGZpbGUpIGZvciBmaWxlIGluIChvcy5wYXRoLmpvaW4ocGF0aCwgZmlsZSkgZm9yIHBhdGgsIF8sIGZpbGVzIGluIG9zLndhbGsocCkgZm9yIGZpbGUgaW4gZmlsZXMpIGlmIG9zLnN0YXQoZmlsZSkuc3RfbXRpbWUgPCB0aW1lKCkgLSA3ICogODY0MDBdCnByaW50KHJlc3VsdCk=