Question
How can I produce a list of word whose word lenght is an even number, a function selectWord that is
passed the string parameter word. The function returns True if the lenght of the string is an even number; otherwise False is returned. Use the filter function and selectWord function print a list of even length words from the list words.
def selectWord(word):
return None # replace this with your code
words = ['python', 'program', 'list', 'string', 'unix', 'hours', 'syntax', 'error']
Top Answer
The python code can be written using below steps : Define a function selectWord that will take a string as parameter and... View the full answer