Python得到当前时间

import datetime as d

print(d.datetime.now().strftime("%Y.%m.%d-%H:%M:%S"))

#2017.12.17-09:51:07


你可能感兴趣的:(python)