Puzzles by Topic

Arithmetic Arithmetic Operations Integer Arithmetic Python Float Arithmetic OOP Basics of OOP OOP OOP – Representation Filter Filter and Recursion Set, Lambda, and Filter The Filter Function DataFrames DataFrames and Datatypes DataFrames and Series Merging DataFrames Add Column To DataFrame DataFrame Creation … Read more

How to Find the Maximum Value in a Python Dict?

There are three problem variants of finding the maximum value in a Python dictionary: Find the maximum value and return this maximum value Find the maximum value and return a (key, value) tuple of both the key and the max value itself Find the maximum value and return only the key assigned to the max … Read more

How to Sort in Python with the Lambda Function as Key Argument?

Challenge: This article shows how to sort a Python list using the key argument that takes a function object as an argument. Quick Solution: You can use the lambda function to create the function on the fly as shown in the following example: Explanation: The code uses the key argument and passes a lambda function … Read more

The Pathfinder Graph Algorithm in Python

Knowing the basics is what sets apart the great from the intermediate coders. In other words, a simple and effective way to grow your skills is to learn the basics of computer science. Python Pathfinder Algorithm In this tutorial, you’ll learn about the pathfinder algorithm that recursively determines whether there’s a direct or indirect path … Read more