Como verificar se a string está no byte formate pitina

isinstance(string, bytes)
Tense Tarsier