
image.png
數(shù)據(jù)中出現(xiàn)這些字符需要將其處理為顯示字符
import html
my_str = 'abc&def'
new_str = html.unescape(my_str)
# 輸出new_str
'abc def'
數(shù)據(jù)中出現(xiàn)這些字符需要將其處理為顯示字符
import html
my_str = 'abc&def'
new_str = html.unescape(my_str)
# 輸出new_str
'abc def'