Implement CLI application by editing main.py.
You may add new files to keep your code clean, if it is allowed in your challenge.
In main.py, there is a function called main
, which gives command line arguments as argv
.
def main(argv):
# code to run
argv
passed here is came from index.py, which passes sys.argv
to main
function. Script name information is excluded in argv
of main method.
You can use the standard print()
method to output results to stdout
.
print(result)
If you want to use external libraries, do the following:
- Write the library name and version in requirements.txt
- Example:
numpy==1.11.0 requests==2.12.4