Find Valid Emails
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
- The result may be an empty list
Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.
More pandas problems
- First Time Below ZeroMedium
- Last Person on the BusMedium
- Manager NamesMedium
- Most Orders CustomerMedium
- Most Recent OrderMedium
- Person CitiesMedium
- Rearrange Products TableMedium
- Record ReadingsMedium