Get the latest tech news

`Bytes`: The Lesser-Known Python Built-In Sequence


The `bytes` data type looks a bit like a string, but it isn't a string. Let's explore it and also look at the main Unicode encoding, UTF-8

You're familiar with adding f in front of single or double (or triple) quotes to create an f-string. If you need a short refresher on hexadecimal and binary numbers, go to the appendix at the end of the article, just before Stop Stack. And for those who want to join The Python Coding Place to access all of my video courses—past and future—join regular live sessions, and interact with me and other learners on the members-only forum, here's the link:

Get the Android app

Or read this on Hacker News

Read more on:

Photo of understanding

understanding

Photo of Sequence

Sequence

Photo of bytes

bytes

Related news:

News photo

How to chop off bytes of an UTF-8 string to fit into a small slot and look nice

News photo

China finds poor data storage leads to waste, as AI, satellites and self-driving cars generate masses of bytes

News photo

Arbitrum and Sequence team with Ubisoft to make Captain Laserhawk Web3 game