print({key:sum(val) for key,val in dict.items()})
# -*- coding: utf-8 -*-
s = [[0] * n] * m
s = [[0] * n] for _ in range(m)]
elif buff<result:
result=s[i][j]
buff<math.fabs(x-result)
Syntax Error: positional argument follows keyword argument: , line 9, pos 59
vk.groups.get(user_id=id1, extended=1, fields=can_message, count=members_count)
bot.delete_message(message.chat.id, my_message.message_id)
sum(np.count_nonzero(row < 0) for row in matr if np.any(row == 0))
res = []
temp=[]
for w in a:
if w[0].isalpha():
if temp:
res.append(temp)
temp = []
temp.append(w)
res.append(temp)
print(res)
idx = [i for i, x in enumerate(a) if x[0].isalpha()]
res = [a[i:j] for i,j in zip(idx, idx[1:]+[len(a)])]
print(res)
with open("myfile.txt") as f:
# считываем w, h, n из первых 2-х строк через f.readline()
# затем до конца считываем все прямоугольники в массив
rects = [list(map(int, r.split(','))) for r in f.splitlines()]
msg = bot.reply_to(message_text="*Ответ:*\n", + message.text.lower().replace(' ', '') + ' = ' + answer, parse_mode='markdown')
msg = bot.reply_to(message, text="*Ответ:*\n" + message.text.lower().replace(' ', '') + ' = ' + answer, parse_mode='markdown')
img = Image.open('blank.jpg')
img.paste(img_avatar, (100, 100))
catalog = f.read().splitlines()
for f in catalog:
try:
app=pywinauto.Application().connect(path=f)
except pywinauto.application.ProcessNotFoundError:
print(f, 'not found')
else:
print("...")
break
for i in range(81):
x, y = divmod(i, 9)
if user_number in list_numeros :
# ...
else: #elif не нужно, раз других условий больше нет
# ...
if user_number in range(1,100):