Carlo Debernardi
dbrcrl.bsky.social
Carlo Debernardi
@dbrcrl.bsky.social
Post-doc. Former philosopher, sociology atm, tomorrow who knows. Science of science. Trying to be bayesian. Python enjoyer.
So true though. I taught programming stuff a bunch of times and students are mostly ok, usual typos etc. Enter absolute and relative paths to external files and they just crash
September 20, 2025 at 8:58 AM
Also, yeah, the usage doesn't make a ton of sense in the case you are describing
September 20, 2025 at 7:37 AM
Definitely not straightforward if you don't know about it and it's not explained. But allows you to iterate over unique values (keys) and it's even better since default dicts are order-preserving (used to not be the case). Choosing the name of the iterating variable to be descriptive might help btw
September 20, 2025 at 7:31 AM
Super practical once you wrap your head around it though!
September 20, 2025 at 7:23 AM