Separating tag attributes as a dictionary
Separating tag attributes as a dictionary Question: My entry (The variable is of string type): <a href="https://wikipedia.org/" rel="nofollow ugc">wiki</a> My expected output: { ‘href’: ‘https://wikipedia.org/’, ‘rel’: ‘nofollow ugc’, ‘text’: ‘wiki’, } How can I do this with Python? Without using beautifulsoup Library Please tell with the help of lxml library Asked By: Sardar || Source …