string
MetPy Mondays '#108
f-strings and string formatting : Unidata Developer's Blog
https://www.unidata.ucar.edu/blogs/developer/entry/metpy-mondays-108-f-strings
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
https://stackoverflow.com/questions/3215168/how-to-get-character-in-a-string-in-python
degree_sign= u'\N{DEGREE SIGN}'
Pythonで文字列・数値をゼロ埋め(ゼロパディング) | note.nkmk.me
https://note.nkmk.me/python-zero-padding/
code:python
s = '1234'
s_zero = s.zfill(8)
print(s_zero)
$ 00001234
Tips
String methods in Python - Python Morsels
Title-case a String in Python - Python Morsels
Python String Methods to Know - Python Morsels
See also
f-string