You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
8 lines
249 B
Python
8 lines
249 B
Python
5 years ago
|
d = {1: 10, 2: 20, 3: 30, 4: 40, 5: 50, 6: 60}
|
||
|
def is_key_present(x):
|
||
|
if x in d:
|
||
|
print('Key is present in the dictionary')
|
||
|
else:
|
||
|
print('Key is not present in the dictionary')
|
||
|
is_key_present(5)
|
||
|
is_key_present(9)
|