« * K @trey.io

Trey Hunner @trey.io

2026-11-22 21:01 UTC

Python Tip #326 (of 365): When you don't care about a dictionary's values, use a set instead. 🧵 Finding yourself making a dictionary where the values are the same as the keys? color_options = {"purple": "purple", "blue": "blue", "green": "green"} #Python #DailyPythonTip

Link: Practical uses of sets (pym.dev/practical-uses-of-sets/#sets-are-like-dictionaries-…)

1 likes, 0 reposts, 1 replies

3 Next post4 More from @trey.ioBackBluesky home
☆ Save to home · 0 Home · Find · Games · Chat · AI · Setup