KHTangent@lemmy.world to Programmer Humor@lemmy.mlEnglish · 1 year agoSwapping integers in Pythonlemmy.worldimagemessage-square5fedilinkarrow-up166arrow-down10cross-posted to: bumba@boomer.casinopython@programming.dev
arrow-up166arrow-down1imageSwapping integers in Pythonlemmy.worldKHTangent@lemmy.world to Programmer Humor@lemmy.mlEnglish · 1 year agomessage-square5fedilinkcross-posted to: bumba@boomer.casinopython@programming.dev
minus-squareJason Novinger@programming.devlinkfedilinkEnglisharrow-up1·1 year 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