Merge or combine dictionaries ** is the unpacking operator
Check for existence of a key in dictionary and retrieve its value if present.
What if you want to find the first item that matches the condition instead of getting a list of items? next() is a built in function which is not that well known.
Selecting elements from a list that satisfy a condition
I am currently working on a project called Peer Feedback, where we are trying to build a nice peer feedback system for college students. We use Canvas Learning Management System (CanvasLMS) API as the data source for our application. All data about the students, courses, assignments, submissions are all fetched from CanvasLMS. The application is…… Continue reading Sensible Test Data
When you have to check for the presence of a value in a list and set a flag based on it, we can avoid typical: set default => check => update routine in Python and condense it to a single line like this.