block['tags'] = [tag.text for tag in soup.find_all('a', {'class': 'a-cats__link'})]
block['tags'] = soup.find('a', {'class': 'a-cats__link'}).text
for tag in block['tags']:
def find_max_period(arr):
for i in range(3, len(arr)//2+1):
def find_max_period(arr):
for i in range(len(arr)//2, 1, -1):
sentences = [['in', 'comparison', 'to', 'dogs', 'cats', 'have', 'not', 'undergone', 'major', 'changes', 'during', 'the', 'domestication', 'process'], ['as', 'cat', 'simply', 'catenates', 'streams', 'of', 'bytes']]
unique_words = ['in', 'comparison', 'to', 'dogs', 'cats', 'have', 'not', 'undergone', 'major', 'changes', 'during', 'the', 'domestication', 'process', 'as', 'cat', 'simply', 'catenates', 'streams', 'of', 'bytes']
result = [[sentence.count(word) for word in unique_words] for sentence in sentences]
print(result)
# [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1]]
type conf
выводит содержимое?