How to move a string in python?

How to transfer a string inline_keyboard_markup
def message_cb(bot, event):
bot.send_text(chat_id=event.from_chat,
 text="Hello with buttons.",
inline_keyboard_markup="{}".format(json.dumps([[
 {"text": "Action 1", "callbackData": "call_back_id_1", "style": "attention"},
 {"text": "Action 2", "callbackData": "call_back_id_2", "style": "attention"},
 {"text": "Action 3", "callbackData": "call_back_id_2", "style": "primary"}
 ]])))


now this:5e9b54a2d3ab7655307901.jpeg
and would like:5e9b54c28426b181065333.png
April 19th 20 at 12:46
1 answer
April 19th 20 at 12:48
Solution
I'm a wizard

def message_cb(bot, event):
bot.send_text(chat_id=event.from_chat,
 text="Hello with buttons.",
inline_keyboard_markup="{}".format(json.dumps([
 [{"text": "Action 1", "callbackData": "call_back_id_1", "style": "attention"},
 {"text": "Action 2", "callbackData": "call_back_id_2", "style": "attention"}],
 [{"text": "Action 3", "callbackData": "call_back_id_2", "style": "primary"}
 {"text": "Action 4", "callbackData", "call_back_id_2", "style": "primary"}]
 ])))
Thank you! - beverly51 commented on April 19th 20 at 12:51

Find more questions by tags Python