The following list is given: artists = ['Sting', 'Phil Collins', 'The Police', 'Queen', 'AC/DC'] What does the list below look like? result = list(filter(lambda artist: len(artist) > 5, artists))

Questions & AnswersCategory: PythonThe following list is given: artists = ['Sting', 'Phil Collins', 'The Police', 'Queen', 'AC/DC'] What does the list below look like? result = list(filter(lambda artist: len(artist) > 5, artists))
Lokesh Kumar Staff asked 2 years ago

The following list is given:

artists = ['Sting', 'Phil Collins', 'The Police', 'Queen', 'AC/DC']

What does the list below look like?

result = list(filter(lambda artist: len(artist) > 5, artists))

 
a. [‘Sting’, ‘Phil Collins’, ‘The Police’, ‘Queen’, ‘AC/DC’]
b. []
c. [‘Phil Collins’, ‘The Police’]
d. [12, 10]