标签:span 实例 class style 处理 col bsp nbsp pre
10.有字符串 "k:1|k1:2|k2:3|k3:4" 处理成字典 {‘k‘:1,‘k1‘:2....}
s = "k:1|k1:2|k2:3|k3:4" dic = {} l1 = s.split(‘|‘) for i in l1: k,v = i.split(‘:‘) dic[k] = v print(dic)
标签:span 实例 class style 处理 col bsp nbsp pre
原文地址:https://www.cnblogs.com/apollo1616/p/9460543.html