python

All posts in the "python" category

DjangoCon US 2024 Recap

Thoughts and links from this year's DjangoCon US conference in Durham, NC.

DjangoChat Podcast

Launching a new podcast with Carlton Gibson focused on Django.

Python Web Frameworks

Web frameworks make life much easier when building robust, scalable web applications. Why reinvent the wheel and build everything from scratch yourself? They are used by everyone from small startups...

Python *args and **kwargs

Python has a special syntax, * (single asterisk) and ** (double asterisks), that lets you pass a variable number of arguments to a function. By convention, these are written as...

Python 2 vs Python 3: Which to Learn?

If you’re new to Python perhaps you’ve heard there are two major versions out in the wild: Python 2 and Python 3. So which should you learn and why is...

Python Optimizations with Guido

Within the Python docs essays section is a wonderful article by Guido van Rossum on optimizing code with Python. You should read the whole thing but I’m highlighting the bits...

Python zip()

A short tutorial on Python's built-in zip() and longest_zip() functions.

Algorithms: Simple Search

Imagine you are visiting your friend Guido’s house and he asks you to find his favorite book from the Harry Potter series, “The Prisoner of Azkaban.” How would you do...

Python's Built-in Help Function

Python has a built-in help function help() that provides an interactive guide to the official Python documentation. Even though I’ve been programming in Python for years, I only just started...

Algorithms: Binary Search

Binary search is typically one of the first algorithms taught to CS students. It is very powerful, prevalent, and yet one of the easier-to-understand algorithms. With binary search, even if...

Python Lambda Expressions

In Python, lambda is a fancy way to define a small anonymous function inline. You never have to use lambda expressions, but they can make your code more concise in...

Python Pass Statement

In Python programming, pass is a null statement typically used as a placeholder. In contrast to a comment statement which is ignored by the Python interpreter, a pass statement is...

Python List Comprehensions Tutorial

List comprehensions in Python are a great feature but also a little hard to wrap your head around at first. Basically a list comprehension is a one line for loop...

Simple Django Project

Django is commonly referred to as a “batteries included” framework that provides far more functionality than you will use in any given Web project. As a result, if you are...

Cactus Static Site Generator

Static site generators combine the best of both worlds: a local server lets you use templates to easily manage the design and content on your site but ultimately all you...