1、新建一个 GetTimeStamp.py 文件,如图所示:
3、导入 time 模块,代码:import time
5、使用 str() 函数将时间戳转换成字符串,并且使用 print() 函数输出,如图所示: