🗂意図的にゼロ埋めできるか試すためのオブジェクトを作る2024/08/20に公開Pythontechimport datetime class DateWithZeroPadding(datetime.date): def str(self): return self.strftime("%Y-%m-%d") 特定の日付のDateWithZeroPaddingオブジェクトを作成 custom_date = DateWithZeroPadding(2024, 8, 20) 出力 print("Custom date with zero padding:", custom_date) Discussion
Discussion