import time

now = time.localtime()
print now
#localtime是傳回tuple格式的時間
Categories: Python