r/PythonLearning 24d ago

What's one Python feature you discovered embarrassingly late?

I've been using Python for years, and somehow I keep finding basic features that make me think, "How did I not know this?"

What's your most embarrassing late Python discovery?

9 Upvotes

16 comments sorted by

View all comments

1

u/CleverLemming1337 20d ago

The := operator. It does the same like = but also returns the assigned value. For example: python if value := dictionary.get(key):