Display Values

 Display Values

QUESTION DESCRIPTION

Write a program to display only the values of the keys in the output

Input:

1.Get two dictionaries key-value elements

Output:
1. Display the first dictionary
2. Display the second dictionary
3. Display the concatenated dictionary
4. Display the values of the concatenated dictionary

a=int(input())
b=int(input())
c=int(input())
d=int(input())
print("First Dictionary")
di1={a:b}
di2={c:d}
print(di1)
print("Second Dictionary")
print(di2)
di3={**di1,**di2}
print("Concatenated dictionary is")
print(di3)
l=[]
for k,v in di3.items():
    l.append(v)
print("The Values of Dictionary")
print(l)

Comments