python 2.7 - argument as name to following argument
Question: 
    import argparse
    def add(number_one = 0,number_two = 2):
        a = int(number_one) + int(number_two)
        return(a)
    
    def Main():
        parser = argparse.ArgumentParser()
        parser.add_argument("n1", help = "first number", type=float)
        parser.add_argument("n2", help = "second number", type=float)
        args = parser.parse_args()
    
        result = add(args.n1, args.n2)
        print(str(result))
    
    if __name__  == '__main__' :
        Main()
    

Hello, I am learning argparse so I write this simple program that sums two
number.

    
    
    python add.py 3 5 
    

I want the program to do the same, but with argument that defines next
argument. For example:

    
    
    python add.py --n1 3 --n2 5
    


Answer: You need to add `--` before `n1` and `n2`. Example:

    
    
    parser.add_argument("--n1", help = "first number", type=float)
    parser.add_argument("--n2", help = "second number", type=float)
    

You can also add a short-option:

    
    
    parser.add_argument("--n1", "-1", help = "first number", type=float)
    parser.add_argument("--n2", "-2", help = "second number", type=float)
    

This way, you can call your program with, for example, the `-1` option instead
of writing out the _incredibly_ long option `--n1`.

