there are SO MANY problems with this code... for start, read https://python-forum.io/Thread-Multiple-...or-keyword
rest is issues with style and logic, but anyway...
one_month_ago = date_time - timedelta(years=10) # define the date one month agoone month or 10 years ago?
rest is issues with style and logic, but anyway...