📜  python 当前年份 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:53.094000             🧑  作者: Mango

代码示例2
from datetime import date
current_date = date.today() 
print("Current date: ", current_date)
print("Current year:", current_date.year)