摘要:
#列表转字符串(只有字符串): li = ["ety", "xyz", "hello", "world"] s = "".join(li) print(s) s = ",".join(a) print(s) ''' etyxyzhelloworld ety,xyz,hello,world ''' 阅读全文
摘要:
dict_a = {} dict_a['a'] = 'b' dict_a['C'] = 'D' print(dict_a) # {'a': 'b', 'C': 'D'} 阅读全文
摘要:
/li/a/@herf 这样取的应该是href的内容/li/a/text() 这样取得是text内容抄自https://blog.csdn.net/weixin_39263590/article/details/80046981属性定位的写法: ("//标签名[ @属性= "属性值"]") 抄自ht 阅读全文