Skip to content

Instantly share code, notes, and snippets.

@spheppner
Last active May 14, 2018 16:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save spheppner/af6907d158ac2c26764ac49213983d96 to your computer and use it in GitHub Desktop.
Save spheppner/af6907d158ac2c26764ac49213983d96 to your computer and use it in GitHub Desktop.
Improved 2-digit number swapper (Python3)
def swap(a, b):
a, b = b, a
return a, b
swapped_value = swap(1, 2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment