-
Notifications
You must be signed in to change notification settings - Fork 253
Dictionary Description
Sar Champagne Bielert edited this page Apr 7, 2024
·
4 revisions
Understand what the interviewer is asking for by using test cases and questions about the problem.
Plan the solution with appropriate visualizations and pseudocode.
General Idea: Find the bug in the provided code!
- Don't just change the input to make it work -- change the function
get_description
so that it can safely handle the situation.
def get_description(info, keys):
for key in keys:
if key in info:
print(info[key])
else:
print(None)