Upper and lower

Report a typo

The some_iterable variable stores words from a sentence. Use dictionary comprehension to create a new dictionary, in which keys will be words from some_iterable, written in uppercase letters, and values will be the same words written in lowercase letters. Print this dictionary.

Hint

You can use upper() and lower() methods on strings to convert all characters to uppercase and lowercase respectively.

Sample Input 1:

Great loves too must be endured.

Sample Output 1:

{'GREAT': 'great', 'LOVES': 'loves', 'TOO': 'too', 'MUST': 'must', 'BE': 'be', 'ENDURED.': 'endured.'}
Write a program in Python 3
# the list with words from string
# please, do not modify it
some_iterable = input().split()

# use dictionary comprehension to create a new dictionary
___

Create a free account to access the full topic