<human>:  Python - Get Yesterday's date as a string in YYYY-MM-DD format
<bot>: Here is some code to get yesterday's date as a string in `YYYY-MM-DD` format using timedelta

(datetime.now() - timedelta(1)).strftime('%Y-%m-%d')

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.