this code returns environment varibles or passed enverionment variable with values
Some notes:


Indent with 4 spaces (PEP8)
Use underscore_names for function and variables.
Use meaningful names for functions (specially) and variables.
Be concise in docstrings.
Don't write for index in range(iterable): but for element in iterable:.
Don't write variable = sys.argv in the middle of the code, use it directly as an argument.
Use an import for each module.


I'd write (Python 3.0):

import sys
import os

def print_environment_variables(variables):
    """Print environment variables (all if variables list is empty)."""
    if not variables:
        for index, (variable, value) in enumerate(sorted(os.environ.items())):
            print("{0}: {1}".format(variable, value))
    else: 
        for variable in variables:
          value = os.environ.get(variable)
          if value:
              print("{0}: {1}".format(variable, value))
          else:
            print("Variable does not exist: {0}".format(variable))

print_environment_variables(sys.argv[1:])


But if you asked me, I would simplify the function without second thoughts, functions are more useful when they are homogeneous (that's it, they return similar outputs for the different scenarios):

def print_environment_variables(variables):
    """Print environment variables (all if variables list is empty)."""
    variables_to_show = variables or sorted(os.environ.keys())
    for index, variable in enumerate(variables_to_show):
        value = os.environ.get(variable) or "[variable does not exist]"
        print("{0}: {1}={2}".format(index, variable, value))