KHTangent@lemmy.world to Programmer Humor@lemmy.mlEnglish · 2 years agoSwapping integers in Pythonlemmy.worldimagemessage-square3fedilinkarrow-up149arrow-down10
arrow-up149arrow-down1imageSwapping integers in Pythonlemmy.worldKHTangent@lemmy.world to Programmer Humor@lemmy.mlEnglish · 2 years agomessage-square3fedilink
minus-squareJason Novinger@programming.devlinkfedilinkEnglisharrow-up1·2 years agoI raise you @lambda _: _() def result() -> int: global a; global b; a, b = b, a hat tip to @sisyphean@programming.dev via Cursed Python
I raise you
@lambda _: _() def result() -> int: global a; global b; a, b = b, a
hat tip to @sisyphean@programming.dev via Cursed Python