Save this video free

Python (Fall 2026) Module 3-5: List Methods

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

Part of Bakersfield College COMP B10. See all 36 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 explains Python list methods and the built-in len() function, emphasizing when methods change a list and how to select, add, remove, and order its items. Examples distinguish count() from total length, demonstrate index calculations and negative indexing, and show that methods such as sort() modify the original list in place.

Key takeaways

Chapters

0:00 clear(), copy(), count(), and len() for Managing Lists
4:00 Using len() and Indexing to Find List Items
8:30 Insert, Remove, Reverse, and Sort Python Lists

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

Transcript excerpt

0:00 And a lot of those are found in list methods.  Now, we've talked about a couple of list methods already. Pop is one. Append is another. So,  those are to remove or add. Here is the, the, the technical sheet for append if  you forget how it should look. Okay. And by the way, I'm updating the, the function  reference in the class to, to be just a little bit more robust and have some more things in it. But  append is here. There is a method called clear. List.clear will remove everything from the list.  Now, the reason that you might want to do that is that it, it removes everything from the list,  but it keeps the variable. So, you can maybe

0:56 start over from scratch or something. Let's say  you, all your pets ran away and now you need to start from scratch. You would use clear before  you start adding new pets to make sure all of the old ones were gone. So, it's like the train  pulls into the station, the car is still there, but it's empty now, right? Kind of like that. Or  the, the cars are all removed from the engine. Copy will make an identical copy of a list. That  is useful because sometimes you want to keep the original order of things and maybe do something to  the, the copy, like sort it alphabetically maybe, or remove certain words or something, but you  still need to keep the original. So for the sake of comparison, or like a backup copy. Count can be  confusing, because a lot of people take count to

1:57 mean how many items are there in this list, when  in fact count will count how many items match a certain value. So in this case I've got a list of  fruits and I'm saying fruits.count, count, and I'm

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.