Advertisements
Advertisements
प्रश्न
Write a program to input n customer name and phone numbers.
कोड लेखन
Advertisements
उत्तर
Use a dictionary to store customer name as the key and phone number as the value.
n = int(input("Enter number of customers: "))
customers = {}
for i in range(n):
name = input("Enter customer name: ")
phone_number = input("Enter phone number: ")
customers[name] = phone_number
print(customers)
shaalaa.com
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
