Rodrigo Girão Serrão 🐍🚀 @mathspp.com · Nov 14

When doing Advent of Code I always end up needing a stack. When I do, I create it by inheriting from `list`. This gives me almost everything I want for free!

4 likes 2 replies

?

Replies

L Ramalho 🍉 · Nov 14

Wonderful example. Thanks! Noted for future citation.

Rodrigo Girão Serrão 🐍🚀 · Nov 14

When I'm feeling fancy, I define some methods in a more “functional” way. I just have fun writing code like this for myself 🤪 👇 yay or nay?