I'm doing some exercises from a book and can't figure out these 2
they're fairly simple but I can't figure them out
I have to make the docstrings pass for each function
def wordset(wordlist):
"""
>>> wordset(['now', 'is', 'time', 'is', 'now', 'is', 'is'])
['is', 'now', 'time']
>>> wordset(['I', 'a', 'a', 'is', 'a', 'is', 'I', 'am'])
['I', 'a', 'am', 'is']
>>> wordset(['or', 'a', 'am', 'is', 'are', 'be', 'but', 'am'])
['a', 'am', 'are', 'be', 'but', 'is', 'or']
"""
def longestword(wordset):
"""
>>> longestword(['a', 'apple', 'pear', 'grape'])
5
>>> longestword(['a', 'am', 'I', 'be'])
2
>>> longestword(['this', 'that', 'supercalifragilisticexpialidocious'])
34
"""
Thanks