Save this video free

Python (Fall 2026) Module 9-4: Algorithms and Solving A8 Part 1

Bill Moseley, Ph.D. - Computer Science Educator · 9:03 · 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 explains why Assignment 8’s email extractor is an algorithmic challenge: a candidate must satisfy multiple structural and character rules, not merely contain an @ sign. He breaks the task into stages (identify likely candidates, split each candidate at @, reverse the first half to scan outward from the boundary, and keep only legal characters) then begins implementing the approach with Python’s `split()` and `[::-1]`.

Key takeaways

Chapters

0:00 Email Validation Rules and the Boundary-Scanning Algorithm
4:13 Finding Candidate Emails with `findEmails` and `cleanEmail`
6:12 Splitting at @ and Reversing the First Half in Python

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

Transcript excerpt

0:02 So, I want to go back. I want to circle  back to assignment eight and talk a little bit about algorithmic thinking as it relates to  assignment 8. You remember the email extractor, of course. That's probably what many of you are  working on right now. At least according to the number of assignments that I've seen turned in,  a lot of people are still working on this, and that's normal. But the reason the email extractor  can be difficult is because it's a fairly complex program, right? We've got all of these rules for  an email. It has to have an at sign before and after with text before and after. Has to have at  least one period after the at sign. It has to have at least two characters after the period after the  at sign. It can't start or end with punctuation. And it can include the following characters in  addition to alphanumeric characters. It can't

0:59 include spaces. And it can't have a period at the  beginning or end or next to the at sign. So those are all rules that we have to figure out. If we  want to validate and extract email addresses, we have to translate those rules to functions  in our code that deal with those things. So, it's become an, a complex algorithm for  something that seems pretty simple at first, because we can recognize the email address here.  We have an algorithm internally that allows us to easily recognize where the email address is and  where there are characters that don't belong here. So, the key is trying to figure out, what are the  steps our brain is going through to do that. So, we talked about this last time. One of the first  things we do is we look for an at sign and we

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.