Python Algorithms Articles

Sorted By: Most Recent
Daniella Meneses Daniella Meneses
Updated on September 18, 2025

Top 50 Python Interview Questions With Example Answers

Python is one of the most popular computer languages, and developers with skills in it remain in high demand. Here are some of the most common questions you can expect in your next interview.

Image: Shutterstock / Built In
Liu Zuo Lin Liu Zuo Lin
Updated on September 12, 2025

__new__ vs. __init__ Methods in Python

In Python, the __new__ method creates and returns a new object of a class, while the __init__ method initializes the attributes of a newly created object of a class. Learn more about what each does and when to use which.

Image: Shutterstock / Built In
Richmond Alake Richmond Alake
Updated on August 12, 2025

Bubble Sort Time Complexity and Algorithm Explained

Bubble sort time complexity describes how the bubble sort algorithm’s runtime scales with input size, being O(n²) in average and worst cases and O(n) in the best case when optimized.

Image: Shutterstock / Built In
Anthony Corbo Anthony Corbo
Updated on July 22, 2025

What Is Python?

Python is a programming language used in website development, software development, task automation, data analysis and data visualization.

Image: Shutterstock / Built In
Anthony Corbo Anthony Corbo
Updated on July 16, 2025

How Is Python Used in Machine Learning?

Python is a popular programming language to use in machine learning because it offers developers exceptional versatility and power while integrating with other software.

Image: Shutterstock / Built In
Roman Davydov Roman Davydov
Updated on July 09, 2025

Best Practices for Python Development in Enterprise Environments

Python’s speed, scalability and security features make it ideal for enterprise environments. Our expert outlines some best practices.

Image: Shutterstock / Built In
Indhumathy Chelliah Indhumathy Chelliah
Updated on June 17, 2025

Merging Lists in Python: A Guide

There are multiple ways to merge lists in Python. Master leveraging append, extend, concatenation, for loops and more. 

Image: Shutterstock / Built In
Yang Zhou Yang Zhou
Updated on June 17, 2025

Python: How to List Files in Directory

In this tutorial, you will learn 5 ways in Python to list all files in a specific directory. Methods include os.listdir(), os.walk(), the glob module and more.

Image: Shutterstock / Built In
Peter Grant Peter Grant
Updated on May 29, 2025

How to Use Python Functions Effectively: 6 Tips to Know

Here are six things you need to know about using these powerful tools in order to write more Pythonic code.

Artturi Jalli Artturi Jalli
Updated on May 22, 2025

An Introduction to the With Statement in Python

The with statement in Python wraps the execution of a code block using the methods defined by a context manager. It's often used to replace a try-finally block with more concise code. Here's how and when to use the with statement in Python.

Image: Shutterstock / Built In