Python 曜日の出力
1.サンプル
こんな感じでしょうか
#
#-*- coding: utf-8 -*-
from datetime import date
import locale
youbiname = ["月","火","水","木","金","土","日"]
d = date(2020,7,11)
print(youbiname[d.weekday()])
2.実行結果
土が出力されます。
PR
統計、機械学習、AIを学んでいきたいと思います。 お役に立てば幸いです。
#
#-*- coding: utf-8 -*-
from datetime import date
import locale
youbiname = ["月","火","水","木","金","土","日"]
d = date(2020,7,11)
print(youbiname[d.weekday()])