def createQuery(params):
    """
    Receives a params dict and build the query string  
    """
    query_params = ["&{}={}".format(key, params[key]) for key in params if params[key]]
    query = ''.join(query_params)[1:]
    return '?' + query if params != [] else query