Strings in Python — a practical guide to Python strings with clear examples you can reuse in real projects.
Python Tutorial Series (19/95). Prefer one article? Read the complete Python tutorial.
Short description
Strings are immutable sequences of characters. Use quotes, f-strings, indexing, and slices.
String basics
s = 'Python'
print(s[0], s[-1], s[0:3])
print(f'Length: {len(s)}')