T
Size: a a a
T
ダ
S
T
🚀
ダ
🚀
ダ
🚀
ダ
ダ
ダ
🚀
🚀
🚀
TO
🚀
🚀
A
repl1 = telebot.types.InlineKeyboardMarkup()
a = ["name1", "name2", "name3", "name4", "name5"]
for i,k in zip(a[0::2], a[1::2]):
button1 = telebot.types.InlineKeyboardButton(text=str(i), callback_data=str(i))
button2 = telebot.types.InlineKeyboardButton(text=str(k), callback_data=str(k))
repl1.add(button1, button2)
a.remove(str(i)); a.remove(str(k))
if a:
button1 = telebot.types.InlineKeyboardButton(text=str(a[0]), callback_data=str(a[0]))
repl1.add(button1)
py3
a = [1, 2, 3, 4]
b = [5, 6, 7, 8]
for i in zip(a, b):
print(i)
(1, 5)
(2, 6)
(3, 7)
(4, 8)