Who are you, kid?

Report a typo

Use the parent method and print a parent tag of the son tag.

Write a program in Python 3
from bs4 import BeautifulSoup

families = '<?xml version="1.0" encoding="UTF-8"?> <families><family name="Swan-Dwyer"><parent name="Charlie"/><parent name="Renee"/><daughter name="Isabella"/></family><family name="Cullen-Hale"><parent name="Carlisle"/><parent name="Esme"/><daughter name="Alice"/><son name="Emmet"/><daughter name="Rosalie"/><son name="Jasper"/><son name="Edward"/></family></families>'

# put your code here
___

Create a free account to access the full topic