Skip to content

Text is a row of characters

Read · 1 of 3

Strings work like lists of characters

s[0] is the first character, len(s) the length, s[::-1] the string backwards, and for ch in s: visits each character.

Strings can't be changed in place (s[0] = "x" is an error). Build a new one instead.