html = """
    <div class="aa bb"></div>
    <div class="aa ccc"></div>
    <div class="aa"></div>
"""
soup = BeautifulSoup(html, 'lxml')
for elm in soup.select('div[class=aa]'):
    pass
How to use Beautiful4 to filter multi class