I have a simple Python code:
import sys
def main(argv1, argv2):
return 0
if __name__ == '__main__':
return main()
Basically I want the code to return to caller what main functions returns but I get the below error during execution:
$ python ../myexamples/sample.py
File "../myexamples/sample.py", line 11
return main()
^
SyntaxError: 'return' outside function
Is it that main method cannot return any value back to OS?