Write a function vocabulary(sentences) that takes a list of sentences and returns the
set of all distinct words used across them, in lowercase. Words are separated by
whitespace.
Example
vocabulary(['The cat', 'the dog']) -> {'the', 'cat', 'dog'}
Implement this function:
def vocabulary(sentences: list) -> set:
Write the function only — the arguments are read for you and the return value is printed automatically.
Arguments arrive as one Python literal per line, in this order: sentences.
Input
['The cat', 'the dog']
Output
{'cat', 'dog', 'the'}