Walrus operator in Python
Mar 19, 2025 - 22:40 - ⧖ 1 minTIL that we can also use walrus operator in Python.
To be fair, I didn't learn about it today, but I had an use case to use it today and I remembered.
Example:
if (my_env := os.getenv("MY_ENV", None)):
do_something(my_env)