If youโre looking for ways to remove or replace all or part of a string in Python, then this course is for you. Youโll be taking a fictional chat room transcript and sanitizing it using both the .replace() method and the re.sub() function.
In Python, the .replace() method and the re.sub() function are often used to clean up text by removing strings or substrings or replacing them. In this tutorial, youโll be playing the role of a developer for a company that provides technical support through a one-to-one text chat. Youโre tasked with creating a script thatโll sanitize the chat, removing any personal data and replacing any swear words with emoji.
Youโre only given one very short chat transcript:
[support_tom] 2022-08-24T10:02:23+00:00 : What can I help you with?
[johndoe] 2022-08-24T10:03:15+00:00 : I CAN'T CONNECT TO MY BLASTED ACCOUNT
[support_tom] 2022-08-24T10:03:30+00:00 : Are you sure it's not your caps lock?
[johndoe] 2022-08-24T10:04:03+00:00 : Blast! You're right!
Even though this transcript is short, itโs typical of the type of chats that agents have all the time. It has user identifiers, ISO time stamps, and messages.
In this case, the client johndoe filed a complaint, and company policy is to sanitize and simplify the transcript, then pass it on for independent evaluation. Sanitizing the message is your job, and thatโs what youโll tackle in this video course.
Whatโs Included:
- 15 Lessons
- Video Subtitles and Full Transcripts
- 2 Downloadable Resources
- Accompanying Text-Based Tutorial
- Q&A With Python Experts: Ask a Question
- Certificate of Completion
Downloadable Resources:








