How many fingers do you see?

Report a typo

Find all finger tags in the defined document and print their number.

Write a program in Python 3
from bs4 import BeautifulSoup

fingers = '<?xmlversion="1.0"encoding="UTF-8"?><fingers><finger><name>Thumb</name><hand>Left</hand></finger><finger><name>Index</name><hand>Left</hand></finger><finger><name>Index</name><hand>Right</hand></finger><finger><name>Middle</name><hand>Right</hand></finger><finger><name>Little</name><hand>Left</hand></finger></fingers>'

# put your code here
___

Create a free account to access the full topic