scubamut
2/10/2019 - 6:33 AM

How to run a FUNCTION

#mymodule.py
import sys
def func(a,b):
    x = a + b
    return x

#This only happens when mymodule.py is called directly:
if __name__ == "__main__":
#     double_args = func(sys.argv)
    print("In mymodule:",func(1,2))
    print('\n','ARGUMENTS : =====>> ','\n',sys.argv)