title = 'Fast & Furious 6'
title = title[:-1]
substring=[x.strip() for x in title.split(';')]
titleFinal = ''
for ch in substring:
newstr = ch.replace("&#", "")
titleFinal+=chr(int(newstr))
print(titleFinal)
用这个代码你可以从ascii中得到char符号。你知道吗
只需使用内置的
html
模块:因为您的字符串由HTML安全序列(数字字符引用)组成。你知道吗
相关问题 更多 >
编程相关推荐