@ unix时间戳 为什么计算机时间要从1970年1月1日开始算起?
========================================
python 格式化输出
var1 = 1234
var2 = 'stringVar2'
print(f'example for variable print: var1 is {var1}, var2 is {var2}')
print(temp) # >> example for variable print: var1 is 1234, var2 is stringVar2
========================================
提取字符串中的浮点数
import re
line = "这是数字提取范例t0hi123.45sisa.Number123.45example123.45example123example" temp = re.findall(r'd{1,}.*d*', line) print(temp) # ['0', '123.45', '123.45', '123.45', '123']