bs4.BeautifulStoneSoup.index

BeautifulStoneSoup.index(element)

Find the index of a child by identity, not value. Avoids issues with tag.contents.index(element) getting the index of equal elements.