def dic_to_str(source_dict):
    """
    字典拆出来，通过&和=连接起来；和上面的str_to_dict函数是逆操作
    :param source_dict: {"a":1,"b":2}
    :return: a=1&b=2
    """
    dict_item = []
    for key, value in source_dict.items():
        dict_item.append("%s=%s" % (key, str(value)))
    return "&".join(dict_item)