python3.4 如何将字符串解码为我想要的

python3.4 How to decode string to what I want

我从网络使用中得到了一些字符串 python3.4。 这是我得到的字符串:

str="&#60lily&#62"

如何得到这个结果?

str="<lily>"

使用替换:

str="&#60lily&#62"
str.replace("&#60","<").replace("&#62",">")