QUESTION DATED : 05/12/2024

(Question Code : QC24120500)

  MAKE A DICTIONARY JUST BY ENTERING THE VALUE AND KEY .  


      ANSWER


a = {}

while True:

    i = input("Enter the key(type stop when all keys are added):")

    if i.lower() == 'stop':

        break

    j = input("Enter the value:")

    a[i] = j

print(a)

                                                                      -----


No comments:

Post a Comment

APPLICATIONS

Support Us Help us create more useful apps! We've already built a screen recorder(availabe in APPS...