Skip to content

Instantly share code, notes, and snippets.

@jnory jnory/

Created Jun 9, 2018
What would you like to do?
def swap(a, b):
a = a ^ b
b = a ^ b
a = a ^ b
return a, b
def main(args):
print(swap(args.a, args.b))
def get_parser():
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('a', type=int)
parser.add_argument('b', type=int)
return parser
if __name__ == '__main__':
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.