text = ''.join('<table class="class{}"></table>'.format(i) for i in range(10))
soup = BeautifulSoup(text)
soup.find_all('table', {'class': ['class1', 'class7']})
Check if class is equal with one of two strings