Please enable JavaScript to use CodeHS

Utah Introduction to Python 1 and 2

Lesson 14.5 Looping Over Characters in a String

Description

In this lesson, students learn how to loop over characters in a string and ways to update strings as they are looped over.


Objective

Students will be able to:

  • Use the in keyword to access characters in a string
  • Use the range keyword to access characters in a string
  • Describe ways to alter characters in a string as it is looped through