Designing Intelligent Python Dictionaries
Designing Intelligent Python Dictionaries
Last week while working on a hobby project, I encountered a very interesting design problem: How do you deal with wrong user input?
Let me explain.
Dictionaries in Python represent pairs of keys and values. For example:
student_grades = {'John': 'A', 'Mary': 'C', 'Rob': 'B'} # To check grade of John, we call print(student_grades['John']) #…
View On WordPress













