Operate on character data with bytes and byte arrays Python 3


show more Operating on character data with bytes and byte arrays provides you with in-depth training on Developer. Taught by Bill Weinman as part of the Python 3 Essential Training show less
please wait ...

Operating on character data with bytes and byte arrays

Bytes and bytearrays are like tuples and lists except instead of containing arbitrary objects, bytes and bytearrays contain bytes. 8-bit words of data. An 8-bit word of data can hold up to 256 different values and this is sometimes a very convenient thing. In particular, it's convenient for converting strings and this is where you will see it used often. You will see it used for other binary things as well but it's often times used for converting strings. And we have a great example of this right here.

This is a text file that I created for this purpose and when I created it on my Mac, it had this lovely little pattern of international characters that makes a little picture. It's a little viral thing that had been floating around on Facebook that I got and I thought it would be great for illustrating this problem, because there are some circumstances where you cannot display it and it doesn't look right, or if you try to read it as ASCII data in Python, you will get an ex...

Operating on character data with bytes and byte arrays
Video duration: 10m 35s 6h 36m Beginner

Viewers:

Operating on character data with bytes and byte arrays provides you with in-depth training on Developer. Taught by Bill Weinman as part of the Python 3 Essential Training

Subjects:
Developer Web
Software:
Python
Author:
please wait ...