buket_menu = InlineKeyboardMarkup(row_width=1)
a = ['q', 'w', 'e', 'r', 't']
b = '\n'.join([f'res {x} = {y}' for x, y in enumerate(a)])
print(b)
arr = [....]
sorted(arr)
if arr[0] == 1 and arr[-1] == 1:
...
def meth(self, var1=None):
if var1 is None:
var1 = self.var1
print(var1)
cursor.execute('SELECT * FROM test WHERE user_id=?' (user_id,))
a = {
"a": "1",
"b": "2",
"dict2": {
"c": "3",
"d": "4",
}
}
def find_dict(d):
for x, y in d.items():
if isinstance(y, dict):
return x
return None
print(find_dict(a))