Visit http://codebasicshub.com/tutorial/python/dictionaries-and-tuples to download answers on exercises. Website: http://codebasicshub.com/ Facebook: …

source

5 Comments

  1. Hi, I am not sure about my code..
    Please check this answer and guide.

    dict = {}
    n = int(input("Enter total numbers of records : "))
    for i in range(n):
    i = input("Enter Name : ")
    j = input("Enter Age : ")
    dict[i] = j
    search_name = input("Enter name for search : ")
    if search_name in dict:
    print(dict[search_name])
    else:
    print("Not Found")

Leave A Reply

Please enter your comment!
Please enter your name here