Skip to content

Python

Python filter A Complete Guide to Filtering Iterables Cover Image

Python filter: A Complete Guide to Filtering Iterables

The Python filter function is a built-in way of filtering an iterable, such as a list, tuple, or dictionary, to include only items that meet a condition. In this tutorial, you’ll learn how to use the filter() function to filter

Python enumerate Python Looping with Index Counters Cover Image

Python enumerate: Python Looping with Index Counters

In this tutorial, you’ll learn how to use the Python enumerate function to improve your Python for loops. The Python enumerate() function allows you to loop over an iterable object, such as lists or dictionaries while accessing the item’s index

Get the Current Date and Time in Python Cover Image

Get the Current Date and Time in Python

In this tutorial, you’ll learn how to use Python to get the current date and time. Being able to work with current dates and times is an important skill in many different aspects in Python. For example, being able to

Python Resize Images Original

How to Resize Images in Python using Pillow

In this tutorial, you’ll learn how to resize an image in Python using the Pillow library. You’ll learn how to resize individual images and multiple images in bulk. You’ll also learn how to specify a percentage to scale by, a

Python List Sort Sorting Lists in Python Key Lambda Cover Image

Python List sort(): An In-Depth Guide to Sorting Lists

In this tutorial, you’ll learn how to use Python to sort a list using the sort() method. Being able to work with lists is an essential skill in Python, given their prevalence. Because lists are ordered and mutable data structures, we can modify

How to Use Python to Count Words and Generate Word Frequencies Cover Image

Python: Count Words in a String or File

In this tutorial, you’ll learn how to use Python to count the number of words and word frequencies in both a string and a text file. Being able to count words and word frequencies is a useful skill. For example,

Python isinstance() Function Explained with Examples Cover image

Python isinstance() Function Explained with Examples

In this tutorial, you’ll learn how the Python isinstance function works and how it can be used in your Python programming. The Python isinstance() function allows you to check if an object belongs to a particular data type or class.

Python List Extend Add Elements to a List Cover Image

Python List Extend: Append Multiple Items to a List

In this tutorial, you’ll learn how to use the Python list extend method, which lets you append multiple items to a list. The Python .extend() method is very similar to the Python .append() method, but lets you add multiple elements

How to Check Your Python Version (Windows, macOS, Linux) Cover Image

How to Check Your Python Version (Windows, macOS, Linux)

In this tutorial, you’ll learn how to check your Python version in Windows, macOS, and Linux. You’ll learn how to check the version of Python using the command line and within a Python script itself. You’ll learn how to get

Python Nested Dictionary Cover Image

Python Nested Dictionary: Complete Guide

In this tutorial, you’ll learn about Python nested dictionaries – dictionaries that are the values of another dictionary. You’ll learn how to create nested dictionaries, access their elements, modify them and more. You’ll also learn how to work with nested

How to Read a Text File in Python (Python open) Cover Image

How to Read a Text File in Python (Python open)

In this tutorial, you’ll learn how to read a text file in Python with the open function. Learning how to safely open, read, and close text files is an important skill to learn as you begin working with different types

Pandas read excel Python read Excel Files Cover Image

How to Use Pandas to Read Excel Files in Python

In this tutorial, you’ll learn how to use Python and Pandas to read Excel files using the Pandas read_excel function. Excel files are everywhere – and while they may not be the ideal data type for many data scientists, knowing