String methods

12-minute lesson · module-strings-02

You are previewing this course as a guest

Read anything and run any exercise you like. It all runs in your own browser, so nothing here is saved: no XP, no progress, and the AI tutor needs an account. Sign in and your work starts counting.

Sign in

String methods

12-minute lesson · module-strings-02

  • Call common string methods: `upper`, `lower`, `strip`, `split`, `replace`, `find`.
  • Chain methods together where it makes sense.
  • Recognize that string methods *return new strings* and never modify the original.

Source attribution

Status: adapted

How to Think Like a Computer Scientist: Interactive Edition source · Strings / String Methods

Adaptation notes. Reading rewritten in our voice. Cleaning exercise authored specifically for PyTutor AI.

License notes. Verify chapter-level license metadata on Runestone before copying any text verbatim. This lesson contains no verbatim quotations.