Python Algorithms Articles

Sorted By: Most Recent
Yang Zhou Yang Zhou
Updated on March 07, 2024

Python: 5 Ways 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
Giorgos Myrianthous Giorgos Myrianthous
Updated on February 21, 2024

What Does “If __name__ == ‘__main__’” Do in Python?

__name__ is a special variable in Python. “If __name__== ‘__main__’” is a conditional statement that tells the Python interpreter under what conditions the main method should be executed.  

Image: Shutterstock / Built In
Seyma Tas Seyma Tas
Updated on February 21, 2024

Garbage Collection and Memory Management in Python

Garbage collection in Python is an automated memory management process that deletes objects when they’re no longer in use. Learn how it works.

Image: Shutterstock / Built In
Yancy Dennis Yancy Dennis
Updated on February 16, 2024

A Guide to HowDoI in Python

HowDoI is a command line utility in Python that allows you to search the internet for answers to programming questions. Here’s how to use it.

Image: Shutterstock / Built In
Harshil Patel Harshil Patel
Updated on December 19, 2023

QuickSort Algorithm: An Overview

QuickSort is a sorting algorithm that uses a divide-and-conquer strategy to split and sort an array. It has a time complexity of O nlogn.

Image: Shutterstock / Built In
Xiaoxu Gao Xiaoxu Gao
Updated on December 06, 2023

How to Write Pythonic Code

Pythonic describes code that doesn’t just get the syntax right but uses the language in the way it’s intended to be used. Here’s how to optimize your Python code.

Image: Shutterstock / Built In
Stephen Gossett Stephen Gossett
Updated on December 01, 2023

22 Python Data Science Courses and Bootcamps to Know

Sorry, R-ficionados. This is Python country.

Image: Shutterstock
Brand Studio Logo
Peter Grant Peter Grant
Updated on December 01, 2023

How to Start Programming in Python: Anaconda 101

Are you looking to try your hand at programming in Python but not sure where to start? Anaconda will make your life a lot easier.

Image: Shutterstock / Built In
Richmond Alake Richmond Alake
Updated on November 16, 2023

Bubble Sort Time Complexity and Algorithm Explained

Bubble sort is a sorting algorithm that uses comparison methods to sort an array. It has an average time complexity of O(n^2). Here’s what you need to know.

Image: Shutterstock / Built In
Anthony Corbo Anthony Corbo
Updated on November 07, 2023

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