> a, b = b, a
> (don't know why this is so famous, I never, ever used that in prod)
This allows you to sort an array in place. It's heavily used in Go:
> (don't know why this is so famous, I never, ever used that in prod)
This allows you to sort an array in place. It's heavily used in Go:
def gcd(a, b):
while b > 0:
a, b = b, a % b
return athat doesn't mean what you think it means.
yeah, it means no temporary variable.