The Teclado Blog
  • Start Learning Python
  • Courses

Learn Python Programming

A collection of 89 posts

All Posts • Coding Interview Problems • Flask • GUI Development • Learn Python Programming • Python Snippets • REST APIs • Understanding the Console • Web Development
Decimal vs float in Python
Learn Python Programming

Decimal vs float in Python

When working with fractions in Python, we tend to use floats, but we also have the decimal module. Learn how to use it, and its benefits over floats.

    Phil Best
    8 min read · Oct 3
Python's format Function
Python Snippets

Python's format Function

You may be familiar with Python's format method, but what about the format function? Learn to use Python's formatting language without string interpolation!

    Phil Best
    2 min read · Sep 30
Python's Partition Method for Strings
Python Snippets

Python's Partition Method for Strings

In this post we cover a lesser known string method called partition. It has a lot of similarities to split, but there are some interesting differences.

    Phil Best
    2 min read · Sep 23
Formatting Integers in Different Bases in Python
Python Snippets

Formatting Integers in Different Bases in Python

In this post we dive deeper into Python's formatting syntax, learning about displaying numbers in different bases. We also make a neat colour converter too!

    Phil Best
    3 min read · Sep 16
Creating Snake Using Tkinter's Canvas Widget (Part 2)
GUI Development

Creating Snake Using Tkinter's Canvas Widget (Part 2)

In this post we finish off our Snake game using Tkinter's Canvas widget. Learn how to move objects on the Canvas, delete them, or add more.

    Phil Best
    16 min read · Sep 12
Nested String Interpolation in Python
Python Snippets

Nested String Interpolation in Python

In this post we continue looking at formatting, this time exploring nested string interpolation, which we can use to dynamically set formatting options.

    Phil Best
    3 min read · Sep 9
Creating Snake Using Tkinter's Canvas Widget (Part 1)
GUI Development

Creating Snake Using Tkinter's Canvas Widget (Part 1)

In this post we start work on recreating the popular arcade game, Snake, using Tkinter's versatile Canvas widget.

    Phil Best
    11 min read · Sep 5
Formatting Numbers for Printing in Python
Python Snippets

Formatting Numbers for Printing in Python

Learn how to leverage Python's detailed formatting language to control how numbers are displayed in your applications.

    Phil Best
    3 min read · Sep 2
How to write decorators in Python
Learn Python Programming

How to write decorators in Python

Decorators in Python can be a confusing topic, particularly for newer students. In this post we'll explain them from the ground up, including how they work, their syntax, and much more!

    Jose Salvatierra
    8 min read · Aug 29
Python's "Ternary Operator"
Python Snippets

Python's "Ternary Operator"

Learn about conditional statements in Python: a slightly obscure bit of syntax that allows for succinct conditional logic, particularly during assignments.

    Phil Best
    2 min read · Aug 26
Tkinter's Grid Geometry Manager
GUI Development

Tkinter's Grid Geometry Manager

In this post we dive deeper into GUI development with Tkinter, exploring the grid geometry manager. Grid is a great alternative to pack for complex layouts.

    Phil Best
    12 min read · Aug 22
How to set up Visual Studio Code for Python development
Learn Python Programming

How to set up Visual Studio Code for Python development

Visual Studio Code is an amazing editor for Python. Here are a few extensions, tips, and tricks I've learned over the years!

    Jose Salvatierra
    5 min read · Aug 21
Generating a Collection of Random Numbers in Python
Python Snippets

Generating a Collection of Random Numbers in Python

In this post we learn about choices and sample: two useful functions in the random module used for generating collections of random values.

    Phil Best
    2 min read · Aug 19
Updating Python Dictionaries
Python Snippets

Updating Python Dictionaries

In this snippet post we look at the update method for dictionaries. We can use update to change several values at once or extend dictionaries with new keys.

    Phil Best
    2 min read · Aug 12
Side values in Tkinter's pack geometry manager
GUI Development

Side values in Tkinter's pack geometry manager

This week we continue our journey into GUI development with Tkinter, and explore how to use the side configuration option in the pack geometry manager.

    Phil Best
    10 min read · Aug 8
Extending Python Lists
Python Snippets

Extending Python Lists

In this week's Python snippet post we look at the extend method for lists. Extend works a lot like append, but allows us to append many values at once.

    Phil Best
    1 min read · Aug 5
Tkinter's Pack Geometry Manager
GUI Development

Tkinter's Pack Geometry Manager

In this post we dive into GUI development and take an important step towards understanding Tkinter's pack geometry manager.

    Phil Best
    10 min read · Aug 1
Python Dictionaries and Loops
Python Snippets

Python Dictionaries and Loops

In this post we cover various ways we can iterate over dictionaries. Learn how to use the items and values methods to write more Pythonic loops with dicts.

    Phil Best
    1 min read · Jul 29
Python's zip_longest Function
Python Snippets

Python's zip_longest Function

zip is an incredibly powerful tool, but it has its limitations. Learn about zip_longest so you can zip collections of any length without losing data!

    Phil Best
    2 min read · Jul 22
Coding Interview Problems: Palindromes
Coding Interview Problems

Coding Interview Problems: Palindromes

We're back tackling another common coding interview problem. This time we're tackling palindromes! Avoid common problems and impress at your next interview.

    Phil Best
    8 min read · Jul 18
Using zip in Python
Python Snippets

Using zip in Python

Python's zip function is extremely powerful and can simplify your code greatly, particularly when working with multiple iterables at the same time. In this post we cover a few ways to use it!

    Phil Best
    2 min read · Jul 15
How to Start Learning Python
Learn Python Programming

How to Start Learning Python

Want to start learning Python? Wondering where and how to begin? We'd love to help. In fact, it's what we do!

    Jose Salvatierra
    2 min read · Jul 9
A Closer Look at Python's Print Function
Python Snippets

A Closer Look at Python's Print Function

Print is one of the first functions we encounter when learning Python, but it can do a lot more than say "Hello, world!". Learn about print's other options and master this common function!

    Phil Best
    2 min read · Jul 8
Destructuring in Python
Learn Python Programming

Destructuring in Python

In this post we take a look at destructuring, also called "unpacking". We can use it to split a collection into single values, e.g. for multiple assignment.

    Phil Best
    6 min read · Jul 4
Python Easter Eggs
Python Snippets

Python Easter Eggs

This week we take a look at some of Python's hidden Easter eggs, including perhaps the most important module in all of Python: antigravity.

    Phil Best
    2 min read · Jul 1
The Teclado Blog © 2025
Privacy Policy