1. 程式人生 > 其它 >python記錄當前系統時間 生成照片直接命名

python記錄當前系統時間 生成照片直接命名

技術標籤:Python語言及其應用學習!pythonpython記錄當前系統時間生成照片直接命名

python記錄當前系統時間:


import datetime

curr_time = datetime.datetime.now()
print(str(curr_time.year)+"."+str(curr_time.month)+"."+str(curr_time.day)+"."+str(curr_time.hour)+"."+str(curr_time.minute)+"."+str(curr_time.second))