date = '2018-10-01'

day = datetime.strptime(date,'%Y-%m-%d')
'''ここは、 = date.strptime(%Y-%m-%d') でできないのは何故??'''

before_5 = day - timedelta(days=5)

print_day = datetime.strftime(before_5,'%Y-%m-%d')
'''= before_5.strftime('%Y-%m-%d')でもできる。'''

print(print_day)


strptimeとstrftime. の入力の仕方が違うのはデフォルトですか?理由などありましたらおしえてください。