#!/usr/bin/env python
########################################################################.......

"""List current environment variables and values.
"""

from __future__ import division, print_function, unicode_literals

import argparse
import os
import sys

def main(args):
    p = argparse.ArgumentParser(description=__doc__)
    p.add_argument("variables", action="store", nargs="*",
                   help="variables to be printed")
    ns = p.parse_args(args)
    
    print(ns.variables)
    
    if ns.variables:
        vardict = {k: v for k, v in os.environ.items() if k in ns.variables}
    else:
        vardict = os.environ
    
    for k, v in vardict.items():
        print("{}={}".format(k, v))
    
    sys.exit(0)

if __name__ == "__main__":
    main(sys.argv[1:])

#!/usr/bin/env python
########################################################################.......

"""List current environment variables and values.
"""

from __future__ import division, print_function, unicode_literals

import argparse
import os
import sys

def main(args):
    p = argparse.ArgumentParser(description=__doc__)
    p.add_argument("variables", action="store", nargs="*",
                   help="variables to be printed")
    ns = p.parse_args(args)
    
    if ns.variables:
        vardict = {k: v for k, v in os.environ.items() if k in ns.variables}
    else:
        vardict = os.environ
    
    for k, v in vardict.items():
        print("{}={}".format(k, v))
    
    sys.exit(0)

if __name__ == "__main__":
    main(sys.argv[1:])

Delete an unwanted line.