2k followers 3 articles/week
How to Read User Input From the Keyboard in Python

You may often want to make your Python programs more interactive by responding dynamically to input from the user. Learning how to read user input from the keyboard unlocks exciting possibilities and can make your code far more useful. The ability to gather input from the keyboard with Python allows you to build programs that can respond uniquely...

Wed Feb 21, 2024 16:45
Unleashing the Power of the Console With Rich

Python’s Rich package is a versatile tool kit that enables you to generate beautifully formatted and highlighted text in the console. It extends beyond this to help you build captivating text-based user interfaces (TUIs). But why opt for a TUI instead of a graphical user interface (GUI)? There are instances where a text interface feels more fitting....

Tue Feb 20, 2024 16:49
The Real Python Podcast – Episode #192: Practical Python Decorator Uses & Avoiding datetime Pitfalls

What are real-life examples of using Python decorators? How can you harness their power in your code? Christopher Trudeau is back on the show this week, bringing another batch of PyCoder's Weekly articles and projects. [ Improve Your Python With 🐍 Python Tricks 💌 – Get a short & sweet Python Trick delivered to your inbox every...

Fri Feb 16, 2024 14:42
BNF Notation: Dive Deeper Into Python's Grammar

While reading the Python documentation, you may have found fragments of BNF notation (Backus–Naur form) that look something like the following: BNF Grammar name ::= lc_letter (lc_letter | "_")* lc_letter ::= "a"..."z" Copied! What’s...

Wed Feb 14, 2024 16:31
Create Conway's Game of Life With Python

Wouldn’t it be cool to build a Python game that only requires initial user input and then seems to take on a mind of its own, creating mesmerizing patterns along the way? You can do exactly that with Conway’s Game of Life, which is about the evolution of cells in a life grid. Implementing the Game of Life algorithm is a good exercise with many interesting...

Tue Feb 13, 2024 16:19
Primer on Python Decorators

In this tutorial on Python decorators, you’ll learn what they are and how to create and use them. Decorators provide a simple syntax for calling higher-order functions. By definition, a decorator is a function that takes another function and extends the behavior of the latter function without explicitly modifying it. This sounds confusing, but it’ll...

Mon Feb 12, 2024 17:07

Build your own newsfeed

Ready to give it a go?
Start a 14-day trial, no credit card required.

Create account