Python · Python Foundations · Foundation · 26 min read
Python Strings, Unicode and Text Formatting: Encodings, f-strings, Format Specs and Safe Text Handling
Handle text correctly. Learn that str is a sequence of Unicode code points, bytes versus str and encodings, normalisation and case-folding, slicing and the everyday string methods, f-strings and the format mini-language, building strings efficiently, regular-expression basics, templates and escaping, and the classic bugs with encodings, whitespace and comparison.
Create an account to start
Create a free account to see what this lesson covers
- Every free lesson in every section, in full
- Track your progress and pick up where you left off
- Free practice questions and an incident simulation
- Takes under a minute: name, email and a password
No card needed. Full access to Python is a paid upgrade you can choose later.