Question: 3-can i get help in coding this function please? Implement a function called search(emails, domain) that creates and returns a list of matching emails given

3-can i get help in coding this function please?

3-can i get help in coding this function please? Implement a function

Implement a function called search(emails, domain) that creates and returns a list of matching emails given an email domain and a string of emails. The emails are given to you as a semicolon-delimited string like "name1@g mu . edu; name2@gmail . com". Your function should ignore all spaces anywhere in the email string. Your function should convert all emails to lowercase before returning your answer. The names you return should be in the same order that they appear in the original string. You may use len(), range(), string. split(), string. lower(), and/or string. strip(). Here are some examples, with the correct return value in a comment next to the function call: . search("name1@gmu. edu; name2@gmail. com", "gmu. edu") # ["name1"] search("name1@gmu . edu; name2@gmail. com", "google. com") # ["name2"] search(" name1@gmu. edu; name2@gmail. com "gmu . edu") # ["name1"] . search("BOB@gmu . edu; Amy@gmu . edu; Sal@gmu. edu", "gmu. edu") # ["bob", "amy", "sal"] . search("name1@gmu . edu; name2@gmail. com", "harvard. edu") # (empty list)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!