FunctionRacerProblemsRace

Find Valid Emails

MediumpandasPython

users has columns user_id and mail. A mail is valid if it looks like prefix@shop.com, where the prefix starts with a letter and the rest of the prefix uses only letters, digits, underscores _, periods . and dashes -. The domain must be exactly @shop.com. Return the user ids with a valid mail, in row order.

Example 1

users {"user_id":[1,2,3],"mail":["ann@shop.com","9bo@shop.com","cy@shop.org"]}
returns [1]

Id 2 starts with a digit and id 3 has the wrong domain.

Constraints

Race itor take your time

Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.

More pandas problems