Bytes - string translation
📁 Advanced Python Topics
data = .encode () # byte translation I can't figure out bytes... No matter how hard I try, python gives me b'hello' lines?
If you try with Cyrillic, then everything works out:
data = .encode ( "" UTF-8 "" ) # b '\\ xD0 \\ x9f \\ xD1 \\ x80 \\ xd0 \\ xb8 \\ xd0 \\ xb2 \\ xd0 \\ xb5 \\ xd1 \\ x82' Or do I have no idea about bytes? Please explain
No answers yet.
Log in to leave an answer
Blogs
Optimizing TypeScript Application Performance: In Practice
From Option to Result in Rust: A Tutorial Without Macros
Reflection and Introspection in Kotlin: Looking Under the Hood of the JVM
TypeScript and ChatGPT: Building an AI Assistant from Scratch