import random
data_bid = {}
n = 2
uniq_no = random.randint(101, 1000)
print(f"Bid NO. :{uniq_no} ")
name = input("Name: ")
phone = input("Phone Number: ")
while len(phone) != 10:
print("<<<<<<-----------Please Enter Valid Data---------->>>>>>")
phone = input("Phone Number: ")
bid_amount = float(input("Enter The Bid amount $: "))
for num in range(1, n):
data_bid[f"{uniq_no}"]["name"] = name
data_bid[f"{uniq_no}"]["phone"] = phone
data_bid[f"{uniq_no}"]["bid amount"] = bid_amount
when I run the code I get KeyError: '553'
I'm unable to resolve it and I want to store my data
data_bid = {"uniq_no" ={"name" = name, "phone" = phone}}
I want to store data in a nested dictionary.