Python Tip #44 (of 365):
Consider dictionary defaulting carefully.
There are many ways to handle missing dictionary keys in Python. Don't default to just one technique: consider which makes the most sense for your situation.
🧵 (1/3)
hello
final day for talk submissions
not enough time to use more words
hurry
https://pretalx.northbaypython.org/nbpy-2026/cfp
feliz viernes 13 Jason 🤭
(Jason happy Friday the 13th)
un buen momazo #geek 🥲 😅
#friday13 #Viernes13 #memes #mexico #devs #json #postgresql #sql #python

Fellow Pythoners,
Should I optimize my CPU-intensive function (which is unsuitable for numpy) by setting up Python multiprocessing first?
Or should I dig into the C & rust options, decide on one of those, and then do the multiprocessing stuff after?
#python #c #rust #technology #programming
We’re excited to welcome Łukasz Langa to PyCascades 2026! 💜🐍
CPython Developer in Residence, Python 3.8 & 3.9 release manager, creator of Black, co-host of the core.py podcast… failed comedian, wannabe musician, and dad.
📅 March 21–22, 2026
🎟️ https://2026.pycascades.com/

Avec les Masters Éditions (univ. Lille, Pont de Bois), on a fait des concordanciers en Python. #concordancier #python #ulille

Season 1 Lesson 1 Part 7 - Your First Steps - Print on Same Line - in Python #jupyternotebook #codingtutorial #vibecoding #softwaredeveloper #python #pythoncode #pythonprogramming #dataengineer #dataanalysis #learncoding
Because some subscriptions are stingy with the content of the feed -- trying to force you to visit the actual page in a browser -- I added a "grab page and show text locally" feature to OldNews. But... this can be annoying too because such sites tend to have a lot of cruft surrounding the actual article text.
So I'm playing with a per-subscription selector to whittle down any such download to the real content of an article.
#rss #python #atom #rssreader #terminal
Understanding a data structure like linked list in Python is a lot easier when you can just see it. Linked_List demo: https://memory-graph.com/#codeurl=https://raw.githubusercontent.com/bterwijn/memory_graph/refs/heads/main/src/linked_list.py×tep=0.2&play
𝗺𝗲𝗺𝗼𝗿𝘆_𝗴𝗿𝗮𝗽𝗵 visualizes Python objects and references, so data structures stop being abstract and become something you can debug with ease. No more endless print-debugging. No more stepping through 50 frames just to find one sneaky reference/aliasing mistake.
#Python #programming #memory_graph

By default, str.strip in #Python removes leading/trailing whitespace:
s = ' a b c '
s.strip() # returns 'a b c'
It takes an optional argument, naming leading/trailing characters to remove. Great for cleaning strings:
s = '"Hello!"'
s.strip(string.punctuation) # 'Hello'

microgpt https://lobste.rs/s/uyjjtz #ai #python
http://karpathy.github.io/2026/02/12/microgpt/
#! /usr/bin/python3
from matplotlib import pylab
import numpy
x=numpy.linspace(-2,2,1000)
y1=numpy.lib.scimath.sqrt(1-(abs(x)-1)**2)
y2=-3*numpy.lib.scimath.sqrt(1-(abs(x)/2)**0.5)
pylab.fill_between(x,y1,color='red')
pylab.fill_between(x,y2,color='red')
pylab.xlim([-2.5,2.5])
pylab.text(0,-1.5,'Klingons do\nNOT celebrate\nValentines\nDay',fontsize=24,fontweight='bold',color='white',horizontalalignment='center')
pylab.savefig('heart2.png')
