Filter Function in Python

Explore the Python filter function through visual. Learn to selectively filter elements from iterables.

The filter function is used to build an iterator (a list, tuple etc.) after taking an iterable and a function as parameters. The built iterator contains only those items that returned as true after passing to function.

Python Lambda Function

An infographic providing a visual guide to understanding Python lambda functions. Learn how to create and use anonymous functions in Python for concise and efficient code. The examples cover using lambda with map() and join() as well.

The nameless or anonymous function can be created by using the keyword lambda. These are small functions that you may use when function objects are required.

Python map() Function?

A visual guide illustrating how the Python map() function works. Learn how to apply a function to one or more iterables (lists, tuples, set etc.) producing a new iterable with the results. Understand the concept of functional programming in Python.

The Python map() function is used to apply a function (custom or built-in) to each item of one or more iterables (lists, tuples, set etc.). The map returns iterable e.g. a list after applying the given function – yielding the result.

Python join Method

The Python join method concatenates the string of a given sequence. The sequence can be lists, tuple, range. The elements of a sequence are joined by a given separator e.g. by space, comma, tab etc.

Python Sleep Method

An infographic on the Python sleep method. Explore how to introduce time delays, control animations, and optimize program timing.

The sleep() is a method of time module that enables suspending the execution of current thread for the given time. The time is provided in seconds.

Python Dictionary: Explained with 11 Examples

An infographic tutorial that helps you master Python dictionaries. Learn to create, manipulate, and and use methods of dictionaries and other useful information.

What is Python dictionary? The dictionary is a data type in Python that is used to store data in key/value pairs. If you have worked in other languages like PHP, you have worked with associative arrays; the dictionary is like that. A dictionary can be created as follows: telephone_dir = {‘Mike’: 123445689,’Haynes’: 45678910, ….}   … Read more

Python 3 print function

Python print

The print function in Python is used to display the output of variables: strings, lists, tuples, ranges, etc. Before version 3.x of Python, the print was taken as a statement. However, from Python 3.x, the print acts as a function. That also means you need to enclose the objects in parenthesis. For example, print (“A … Read more

Convert a Python String to int and float

Infographic: Converting Python String to Integer and Float - A visual guide illustrating how to convert Python strings to integer and floating-point numbers using int() and float() functions.

How to convert Python string to an int and float In certain scenarios, you may need to convert a string to an integer or float for performing certain operations in Python. If you try doing some action with a “string number” like addition, or subtraction, it will generate an error as shown below. The code … Read more

How to Convert Python int to string

An graphic showing how to convert into to string in Python. Learn to use str() function, f-string, format() method etc. by visual graphic.

Converting String to int in Python In Python, you may convert an int to a string in different ways. For example: str() Function format() Method f-string join() function- For list of int In this tutorial, we will show you examples of a few ways. The str function in Python The str function of Python can … Read more