Write a function abbreviation(sentence) that takes a string of words separated by
spaces and returns its abbreviation: the first letter of each word in uppercase, joined
by dots, with a trailing dot at the end. Use a comprehension rather than an explicit
loop.
Example
abbreviation('central processing unit') -> 'C.P.U.'
Implement this function:
def abbreviation(sentence: str) -> str:
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: sentence.
Input
'central processing unit'
Output
'C.P.U.'