Walrus operator (:=): This operator allows you to assign and return a value in the same expression. It can be particularly useful in list comprehensions or other situations where you need to assign a value to a variable and use it in a subsequent expression. Here's an example:
if (n := len(my_list)) > 10:
print(f"List is too long ({n} elements, expected <= 10)")