Menu
CoddyTech

Recap - Email Validator

Part of the Logic & Flow section of Coddy's Python journey. Lesson 74 of 78.

challenge icon

Challenge

Medium

Create a function named clean_email_list that takes a list of email addresses and returns a list of valid, standardized email addresses.

Requirements:

    - Convert all emails to lowercase and strip all whitespace at the beginning or end

    - Only keep emails that:

        - Contain exactly one '@' symbol

        - Have at least one character before the '@'

        - Have at least one character after the ‘@’

Use map() and filter() to solve the problem. Do not use for or while loops, comprehensions or generator expressions anywhere in your code, including inside helper functions.

Try it yourself

def clean_email_list(emails):
    # Write your code below
    
    
    
    
    valid_emails = 
    return list(valid_emails)

All lessons in Logic & Flow

Practice on your own: Online Python compiler