Answer the question
In order to leave comments, you need to log in
How to remove an element from a python dictionary?
there is such a code and it works, but I can delete the element as I understand it from the dictionary and the code works infinity can you tell me how to solve this problem
(this is the SimpleQiwi library)
api = QApi(phone=phone, token=token)
payments = api.payments['data']
amount = 1
@bot.message_handler(content_types=['text'])
def text(message):
if message.text == "pay":
bot.send_message(message.chat.id,message.chat.id)
if message.text == "chek":
for info_payments in payments:
if info_payments['comment'] == "444": # str(message.chat.id):
print("da")
print(info_payments['sum']['amount'])
bot.send_message(message.chat.id, "вы отправили: " + str(info_payments['sum']['amount']))
del info_payments['comment']
bot.polling()
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question