Достать все тексты кнопок

Есть такой вот вывод:

ReplyInlineMarkup(rows=[KeyboardButtonRow(buttons=[KeyboardButtonCallback(text='1BUTTON', data=b'choose-method-tinkoff', requires_password=False)]), KeyboardButtonRow(buttons=[KeyboardButtonCallback(text='2BUTTON', data=b'choose-method-sberbank', requires_password=False)]), KeyboardButtonRow(buttons=[KeyboardButtonCallback(text='3BUTTON', data=b'choose-method-alfabank', requires_password=False)]), KeyboardButtonRow(buttons=[KeyboardButtonCallback(text='4BUTTON', data=b'choose-method-vtb', requires_password=False)]), KeyboardButtonRow(buttons=[KeyboardButtonCallback(text='5BUTTON', data=b'choose-method-SystemFastPayments', requires_password=False)]), KeyboardButtonRow(buttons=[KeyboardButtonCallback(text='6BUTTON', data=b'choose-method-yoomoney', requires_password=False)]), KeyboardButtonRow(buttons=[KeyboardButtonCallback(text='7BUTTON', data=b'choose-method-payeer', requires_password=False)]), KeyboardButtonRow(buttons=[KeyboardButtonCallback(text='· 1 ·', data=b'payment-methods-page-0', requires_password=False), KeyboardButtonCallback(text='2', data=b'payment-methods-page-1', requires_password=False)]), KeyboardButtonRow(buttons=[KeyboardButtonCallback(text='‹ Назад', data=b'back', requires_password=False)])])

Вывод должен быть

x = {"1BUTTON","2BUTTON","3BUTTON","4BUTTON","5BUTTON","6BUTTON","7BUTTON","Назад"}

Как вывести все тексты кнопок в один словарь? Заранее огромное спасибо!


Ответы (0 шт):