 
  
  
 
  
  from collections import defaultdict
queries = [
'смотреть сериалы онлайн',
'новости спорта',
'афиша кино',
'курс доллара',
'сериалы этим летом',
'курс по питону',
'сериалы про спорт'
]
n_quer = len(queries)
res = defaultdict(int)
for quer in queries:
    res[len(quer.split())] += 1
print(res) 
  
  import base64
import requests
with open("fig1.png", "rb") as file:
    url = "https://api.imgbb.com/1/upload"
    #  key_imgbb - это твой api ключ, получаешь его зарегавшись на сервисе
    payload = {
        "key": key_imgbb,
        "image": base64.b64encode(file.read()),
    }
    res = requests.post(url, payload)
print(res.json())  # забираешь отсюда нужную тебе ссылку на файл, и отправляешь в google 
  
   
  
  from itertools import product
tuple_one = ('one',  'two', 'thousand')    # name
tuple_two = ('blue', 'black',  'yellow')    # color
print(list(product(tuple_one, tuple_two)))[('one', 'blue'), ('one', 'black'), ('one', 'yellow'), ('two', 'blue'), ('two', 'black'), ('two', 'yellow'), ('thousand', 'blue'), ('thousand', 'black'), ('thousand', 'yellow')] 
  
  for line in allurl:
        writers.writerows(line)writers.writerows(allurl)       
  
  max_number = float('-inf')
[(max_number := i) for i in map(int, input().split(',')) if i > max_number] 
  
  x = int(input('введите первое значение и второе значение через пробел и запятую:')) 
  
  from itertools import product
print(list(product('1234567890', repeat=3))) 
       
  
  from collections import Counter
lib = Counter(input('Введите слово:\n')) 
  
  from itertools import combinations
sq = {e**2: e for e in range(1, 5001)}
maximum = 0
cmaximum = 0
count = 0
for a, b in combinations(sq, 2):
    ab = a + b
    if ab in sq:
        count += 1
        tmp_maximum = sq[a] + sq[b] + sq[ab]
        cmaximum, maximum = (sq[ab], tmp_maximum) if tmp_maximum > maximum else (cmaximum, maximum)
print(count, cmaximum) 
  
  def get_without_first_and_last(numbers):
    return sorted([int(str(x)[1:-1]) for x in numbers if len(str(x)) > 2])
my_data = [13, 442, 23, 1234, 5]
print(get_without_first_and_last(my_data)) 
  
  def save_doc(items, path):
    with open(path, "w", newline='') as file:
        writer = csv.writer(file, delimiter=';')
        writer.writerow()
        writer.writerow(['Термопаста', 'Цена'])
        for item in items:
            writer.writerow([item['title'], item['brand']])