def format_vars ( args ) : variables = [ ] for key , value in args . items ( ) : if value : variables += [ '{0}={1}' . format ( key , value ) ] return variables
a list of variables python
Format the given vars in the form : flag = value
def format_vars(args):
    """Format the given vars in the form: 'flag=value'"""
    variables = []
    for key, value in args.items():
        if value:
            variables += ['{0}={1}'.format(key, value)]
    return variables