Living-room

Report a typo

Print everything that is stored in the <living_room></living_room> tag.

Tip: Use the method that returns a list, not a generator.

Write a program in Python 3
from bs4 import BeautifulSoup

apartment = '<?xml version="1.0" encoding="utf-8"?><apartment><living_room><furniture><item number="5">chair</item><item number="1">sofa</item><item number="2">table</item><item number="3">bookcase</item><item number="2">armchair</item></furniture><other><item number="1">fireplace</item></other></living_room><bedroom><furniture><item number="1">bed</item><item number="2">bedside_cabinet</item></furniture><other><item number="2">lamp</item></other></bedroom></apartment>'

# put your code here
___

Create a free account to access the full topic