Lesson 6️⃣: String Methods

Bitesize Key points from this lesson

  1. This lesson was focused on string methods, which are functions that can be applied to string objects in Python.
  2. We learned about common string methods such as upper(), lower()and title(), which allow us to manipulate the case of strings.
  3. We also explored methods like strip(), lstrip() and rstrip() that remove whitespace from the beginning and end of strings.
  4. Additionally, we looked at the replace() method, which allows us to replace occurrences of a substring with another substring.
  5. we also learned about the len() and round() methods, which are used to get the length of a string and round a number to a specified number of decimal places, respectively.
  6. Finally, we explored the use of escape codes and the use of unicode characters in strings, which allow us to include special characters and symbols in our strings.

Activities

The best way to improve your programming skills is to practice.
I created a course for learning Python that you can follow alongside these lessons.
You can check these out at BitFez’s Learning to code in Python Roadmap 🛣
You should specifically follow the Step 3: Iteration activities: