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>" 

1 Answer 1

1

use replace:

str="&#60lily&#62" str.replace("&#60","<").replace("&#62",">") 
Sign up to request clarification or add additional context in comments.

2 Comments

@E.Tarrent if you want decode html entities see: stackoverflow.com/questions/2087370/…
Thank you.This is what I want

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.