Get your Py with Pyrates



Try new ways with the Python's new operator -- Walrus :=

Have a look;

a = 11

if (b := a) > 10:
    print(f"The value of b is {b} and is greater than 10.") 

Have a try on your code editor to see the results for yourself.

It won't bite like a real python :)

Comments

Post a Comment