Skip to content

Latest commit

 

History

History
18 lines (14 loc) · 213 Bytes

File metadata and controls

18 lines (14 loc) · 213 Bytes

Walrus

Modify the following code so it will use the walrus operator:

x = 50
y = x - 20
if y == 30:
    print("super")

Solution

x = 50
if y := x - 20 == 30:
   print("super")