09:38str vs bytes in Python
From the creator
strings vs. bytes, what's the diff? Strings and bytes are both fundamental types in Python. At a surface level they also appear do be very similar objects. From the similar notation, to the functions they offer, to their use cases like writing to a file, bytes and strings appear to do nearly the same thing. And yet, Python enforces a strict separation between them, making them unable to mix and requiring explicit conversions using str.encode() or bytes.decode() in order to translate between them. So what makes them different at all? In this video we'll find out how str and bytes differ and talk about encodings, like utf-8, which are the missing link between them. ― mCoding with James Murphy (https://mcoding.io) Source code: https://github.com/mCodingLLC/VideosSampleCode bytes docs: https://docs.python.org/3/library/stdtypes.html#bytes Official unicode site: https://home.unicode.org/ UTF-8 wiki: https://en.wikipedia.org/wiki/UTF-8 PEP 686: https://peps.python.org/pep-0686/ SUPPORT ME ⭐ --------------------------------------------------- Sign up on Patreon to get your donor role and early access to videos! https://patreon.com/mCoding Feeling generous but don't have a Patreon? Donate via PayPal! (No sign up needed.) https://www.paypal.com/donate/?hosted_button_id=VJY5SLZ8BJHEE Want to donate crypto? Check out the rest of my supported donations on my website! https://mcoding.io/donate Top patrons and donors: Jameson, Laura M, Dragos C, Vahnekie, Neel R, Matt R, Johan A, Ca
Published 2023-02-27 · Watch on YouTube ↗
Availability and playback restrictions are controlled by the original channel.





