Issue #614

Tic-Tac-Toe with AI, LRU Caches, Debugging, and More

Jan. 30, 2024

Tic-Tac-Toe with AI, LRU Caches, Debugging, and More
#614 – JANUARY 30, 2024 VIEW IN BROWSER
The PyCoder’s Weekly Logo
Create a Tic-Tac-Toe Python Game Engine With an AI Player
In this video course, you’ll create a universal game engine in Python for tic-tac-toe with two computer players, one of which will be an AI player using the powerful minimax algorithm. You’ll give your game library a text-based graphical interface and explore two front ends.
REAL PYTHON course

A Priority-Expiry LRU Cache Without Heaps or Trees
This article covers how to implement an LRU cache using only the Python standard library. It does so the hard way, staying away from heaps and binary search trees.
ADRIAN

Snyk’s Ethical Hacking 101 Workshop ⚡ | February 8, 2024 | 11:00am ET
Join Snyk’s Ethical Hacking 101 Workshop and learn how ethical hacking can help you identify security weaknesses in your systems before attackers do 🤖 Get live support in the hands-on lab ✅ as you find and fix vulnerabilities 🛠️ and ✅ learn the process of responsible disclosure. Register today →
SNYK.IOsponsor

Debugging Python
Tips for debugging Python, based on a talk done at PyCon Sweden. Learn how to be better at debugging your Python code!
JUHA-MATTI SNTALA

DSF Calls for Applicants for a Django Fellow
DJANGO SOFTWARE FOUNDATION

Wagtail 5.2.3 Released
WAGTAIL


Articles & Tutorials


Ten Python datetime Pitfalls
It’s no secret that the Python datetime library has its quirks. Not only are there probably more than you think, but third-party libraries don’t address most of them! Arie created a new library to explore what a better datetime library could look like.
ARIE BOVENBERG • Shared by Arie Bovenberg

Exploring the Role of Static Methods in Python
Python is a versatile language, supporting multiple programming paradigms, including procedural, object-oriented, and functional programming. This article discusses static methods, but from a functional programming perspective.
BOB BEDERBOS

Performance Analysis of Python’s dict() and {}
This article delves into the details behind the choice of calling dict() or using {} directly in your code. It covers the underlying structures in the interpreter as well as performance.
KAMIL RUSIN

My Django Roadmap Ideas
Thibaud Cola is the newest Django Software Foundation member and this post describes his ideas for the Django roadmap session for 2024. Learn what might be coming in future Django core.
PAOLO MELCHIORRE

Python’s Magic Methods: Leverage Their Power in Your Classes
In this tutorial, you’ll learn what magic methods are in Python, how they work, and how to use them in your custom classes to support powerful features in your object-oriented code.
REAL PYTHON

Filter a list in Python
This tutorial explains the different methods for filtering a list in Python. It shows you how to use the filter() function, list comprehensions, and good old loops.
SOUMYA AGARWAL


Projects & Code


Brought to you by Real Python for Teamssponsor
Online Python training created by a community of experts. Give your team the real-world Python skills they need to succeed →

datamapplot: Creating Beautiful Plots of Data Maps
GITHUB.COM/TUTTEINSTITUTE

marimo: A Reactive Notebook for Python
GITHUB.COM/MARIMO-TEAM

niquests: Requests but Multiplexed
GITHUB.COM/JAWAH

unidep: Unified Pip and Conda Dependency Management
GITHUB.COM/BASNIJHOLT

falco: CLI and Guides for the Modern Django Developer
GITHUB.COM/TOBI-DE

📆🐍 Upcoming Python Events


Weekly Real Python Office Hours Q&A (Virtual)
January 31, 2024

Canberra Python Meetup
February 1, 2024

Sydney Python User Group (SyPy)
February 1, 2024

Python Devroom @ FOSDEM 2024
February 4 to February 5, 2024

Melbourne Python Users Group, Australia
February 5, 2024
Happy Pythoning!
Copyright © 2024 PyCoder’s Weekly, All rights reserved.