filmov
tv
Program to Check if a Given Key is Already Exists in a Dictionary or Not?
Показать описание
#PythonDictionaries
#ProgramtoCheckifaGivenKeyisAlreadyExistsinaDictionaryrNot
#PythonPrograms
Write a program to check if a given key is already exists in a dictionary or not?
d={101:'python',102:'c',103:'cpp',104:'java'}
n=int(input('enter key to be search'))
print('The given key is present and the value of the key is')
else:
print('given key is not present in a dictionary')
11
#ProgramtoCheckifaGivenKeyisAlreadyExistsinaDictionaryrNot
#PythonPrograms
Write a program to check if a given key is already exists in a dictionary or not?
d={101:'python',102:'c',103:'cpp',104:'java'}
n=int(input('enter key to be search'))
print('The given key is present and the value of the key is')
else:
print('given key is not present in a dictionary')
11