Save this video free

Python (Fall 2026) Module 2-7: Transforming Strings

Bill Moseley, Ph.D. - Computer Science Educator · 13:48 · Watch on YouTube

Part of Bakersfield College COMP B10. See all 47 lectures and search them

These notes were made with YouTube Collector. Paste any YouTube link and get the same: a summary, chapters and a searchable transcript.

Overview

Bill Moseley introduces Python string methods as operations that return transformed strings without changing the original. He demonstrates case conversion, whitespace removal with `strip()`, self-assignment and method chaining, then previews `replace()` and `find()` for editing and searching text.

Key takeaways

Chapters

0:00 Python String Methods: Case Conversion and Whitespace
5:00 Using `strip()` to Clean User Input
9:00 Self-Assignment, Method Chaining, and More String Tools

Keep these chapters and the full searchable transcript in your own library.

Transcript excerpt

0:00 So we have lots of string  methods, lots and lots of them. These are some of the ones I want to introduce  you to. Now, am I going to tell you every single string method today? Yes, it'll be on the quiz  next week. Just kidding. No quizzes. Quizzes are stupid. Especially for programming. Not just  for programming, but especially for programming. Will I tell you? No, I'm not going to tell you all  the string methods. You can look them up yourself, but I'm going to tell you some of them that will  give you a good sense of how they're used and how you can use them. So we already talked about  the second one on this list, string. And string in this instance is just a word that I'm using  to refer to the variable, to remind us that all of these methods have to be using a string  as what we would call the context of that.

1:00 So in other words, they have to be something  that. It's an ability that a string has. So every time we use a method that's a string  method, we have to use that on a string. Other thing to remember is that the string  that you use it on doesn't get changed. It just returns a version of that  string that has this done to it. So we talked about the second one.  The second one, string.lower(), returns a lowercase version of that string.  What do you think string.upper() does? Uppercase. Yeah. If you said it makes it really  hyper and, no, that would be the wrong kind of upper. Uppercase. string.swapcase(). So it  makes everything that's uppercase lowercase

1:57 and everything that's lowercase uppercase.  Why would you use that? Oh, there's a lot of different reasons, but a lot of them have to do  with analyzing a string. So that's a useful one.

This is the start of the transcript. Save this video free for the whole transcript, searchable and time-coded.

In this course

Related notes

Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, Bill Moseley, Ph.D. - Computer Science Educator.

Want the full transcript?

Save this video in YouTube Collector to get its complete searchable transcript, your own AI summaries, and a library that keeps every video you collect in one place.