Definition: Ordered, immutable sequences of characters.
Syntax: s = "hello"
Common operations & properties:
- Slicing:
s[1:4]
- Concatenation:
s + " world"
- Repetition:
s * 3
- Find:
s.find("l")
- Replace:
s.replace("e", "a")
- Split/Join:
s.split(), ' '.join(...)
Definition: Ordered, immutable sequences of characters.
Syntax:
s = "hello"Common operations & properties:
s[1:4]s + " world"s * 3s.find("l")s.replace("e", "a")s.split(), ' '.join(...)