def variablename(var):
    """
    Returns the string of a variable name.
    """
    s=[tpl[0] for tpl in itertools.ifilter(lambda x: var is x[1], globals().items())]
    s=s[0].upper()
    return s
Returns the string of a variable name.