环境:python3.9 1. 如何将时间戳转为科学计数法? from time import time t = int(time()) #1660199861 t = '{:.9e}'.format(t) 代码输出: 1660199861e+09 2. 反过来, 怎样将科学计数法的字符串转为数值: from decimal import Decimal t_e = '1.655794511e+09' print(Decimal(t_e)) 代码输出: 1655794511