start a basic web server

# cd into the directory containing the code
python -m SimpleHTTPServer 8000

Use argparse

import argparse

parser = argparse.ArgumentParser(description='get arguments')
parser.add_argument('--platform', '-p',
                    nargs="*",
                    help='Platform to apply')
parser.add_argument('--ldif', '-l',
                    required=True,
                    help='LDIF to apply')
parser.add_argument('--env', '-e',
                    nargs="*",
                    help='List of environments to apply change to')
args = parser.parse_args()
print(args)

Pretty Print

import pprint

pp = pprint.PrettyPrinter(compact=False,indent=4)

pp.pprint(hosts)