Skip to content

Glossary: Python Basics

String methods

Also written: .upper(), .lower(), .title(), .strip(), .replace(), .startswith(), .endswith(), .isdigit()

Methods that tidy or test text. `strip` removes spaces from both ends, `upper`, `lower` and `title` change capitals, `replace` swaps text, and `startswith`, `endswith` and `isdigit` answer yes-or-no questions.

Where the book teaches it