1

I get some string from web use python3.4. Here is string I get:

str="&#60lily&#62"

How to get this result?

str="<lily>"
E.Tarrent
  • 89
  • 6

1 Answers1

1

use replace:

str="&#60lily&#62"
str.replace("&#60","<").replace("&#62",">")
Alireza Afzal Aghaei
  • 1,184
  • 10
  • 27