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)

 

1 Comments

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post