In this video course, you’ve learned how to replace strings in Python. Along the way, you’ve gone from using the basic Python .replace()
string method to using callbacks with re.sub()
for absolute control. You’ve also explored some regex patterns and deconstructed them into a better architecture to manage a replacement script.
With all that knowledge, you’ve successfully cleaned a chat transcript, which is now ready for independent review. Not only that, but your transcript-sanitizing script has plenty of room to grow.
To continue your learning journey, check out:
- 📰 Regular Expressions: Regexes in Python (Part 1)
- 📰 Regular Expressions: Regexes in Python (Part 2)
- 🎬 Regular Expressions and Building Regexes in Python
- 📰 How to Get and Use the Current Time in Python
Congratulations, you made it to the end of the course! What’s your #1 takeaway or favorite thing you learned? How are you going to put your newfound skills to use? Leave a comment in the discussion section and let us know.