My Python code is like this i have a program to store the names and phone number . First I store the value of input and then i add names and value
then i enter the names of the value and if statement checks the value
n=int(input())
dic_names=[]
for i in range(n):
a=[x for x in input().split()]
dic_names.append(a)
for i in range(3):
samp_names=[x for x in input().split()]
for i in range(3):
for j in range(n):
if (samp_names[i] == dic_names[j]):
print(samp_names[i]+"="+str(dic_names[j][1]))
Aucun commentaire:
Enregistrer un commentaire