TL;DR
bytes -> str:
In []: b'\x90\x90\x90\x90'.decode('latin-1')
Out[]: '\x90\x90\x90\x90'
str -> bytes:
In []: '\x90\x90\x90\x90'.encode('latin-1')
Out[]: b'\x90\x90\x90\x90'
But Why Tho
Sometimes when you're programming or you're playing CTFs
[https://majorleaguecyber.org/