Module 2 · Python data types, variables, operators, and basic I/O operations
Working with strings
Text is everywhere in real programs. Go beyond writing a string: reach inside it by index and slice, reshape it with built-in methods, and build new text cleanly with f-strings.
Begin lesson 1 →- 1Inside a stringA string is a sequence of characters — index it, slice it, measure it (and never change it).→
- 2String methodsupper, lower, strip, replace, split — each hands back a brand-new string.→
- 3f-stringsThe modern way to build text: drop variables straight into a string with {curly braces}.→
- 4QuizCheck your grip on indexing, slicing, methods and f-strings.→