string
f-strings and string formatting : Unidata Developer's Blog
code:python
import datetime
now=datetime.utcnow()
temp=20
humidity=15.1
print(f'{now: %Y-%m-%d %H}: temperature={temp:.1f}, humidity={humidity:03.0f}')
How to get ° character in a string in python? - Stack Overflow
degree_sign= u'\N{DEGREE SIGN}'
Pythonで文字列・数値をゼロ埋め(ゼロパディング) | note.nkmk.me
code:python
s = '1234'
s_zero = s.zfill(8)
print(s_zero)
$ 00001234
Tips
See also