I need to implement a function that takes as a parameter a list of names(strings) and another parameter that takes a list of characters. The function should print out the names in the first list that start with the letters in the second list. If the list is empty, the function doesnt print anythig.
here is how the function call would look like and its outputs
>>> selectSome(["Emma", "Santana", "Cam", "Trevor", "Olivia", "Arthur"], ['A', 'B', 'C', 'D', 'E', 'F'])
Emma
Cam
Arthur
>>> selectSome(["Holly", "Bowel", "champ", 'Fun', 'Apu'], ['a', 'F', 'C'])
champ
Fun
Apu
>>> selectSome([], ['a', 'b', 'c'])
>>> selectSome(['Eva', 'Bob'], [])
>>>
Here’s the gist of what you need:
I’ll leave wrapping that as a function up to you.
Test your understanding:
forloop?