Search⌘ K

Diving In

Explore the foundations of Python 3 strings in this lesson. Understand how strings are sequences of Unicode characters rather than byte encodings, and learn to convert between strings and byte sequences. Gain practical skills in creating strings using quotes, retrieving string length with len(), accessing characters via indexing, and concatenating strings using the plus operator.

We'll cover the following...

In Python 3, all strings are sequences of Unicode characters. There is no such thing as a Python string encoded in UTF-8, or a Python string encoded as CP-1252. “Is this string UTF-8?” is an invalid question. UTF-8 is a way of encoding ...