family = {} num = int(input("How many elements?: ")) for i in range(num): k = input("Enter key: ") v = input("Enter value: ") family.update({k:v}) print(family)