Q. Write a Python program to sort a list alphabetically in a dictionary.
Answer =
dic = {} lst = eval (input("Enter a alphabetically list :-")) lst.sort() for i in range(len(lst)): dic[ i + 1 ] = lst [ i ] print(dic)
Answer =
dic = {} lst = eval (input("Enter a alphabetically list :-")) lst.sort() for i in range(len(lst)): dic[ i + 1 ] = lst [ i ] print(dic)
SHOW ANY EXAMPLE
ReplyDeletePost a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )