demo_ref_string_encode.py:
txt = "My name is Ståle" x = txt.encode() print(x)
➜ begtut>python demo_string_encode.py
b'My name is St\xc3\xe5le'