Commit fb1baad7 authored by 赵威's avatar 赵威

update make_dict_from_pair

parent eeb72678
...@@ -13,10 +13,13 @@ def merge_values(list_of_dict): ...@@ -13,10 +13,13 @@ def merge_values(list_of_dict):
# [("a", 1), ("b", 2)] # [("a", 1), ("b", 2)]
# {'a': 1, 'b': 2} # {'a': 1, 'b': 2}
# [{'缩阴道激光': 1.949194898204873}, {'': 1.949194898204873}, {'': 1.949194898204873}, {'私处手术': 1.949194898204873}]
def make_dict_from_pair(x): def make_dict_from_pair(x):
if len(x[0]) > 0: try:
return dict(zip(x[0], [x[1]] * len(x[0]))) x[0].remove("")
return {} except Exception as e:
pass
return dict(zip(x[0], [x[1]] * len(x[0])))
def update_tag3_user_portrait(cl_id): def update_tag3_user_portrait(cl_id):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment