H
H
hpmalo2018-02-06 12:22:01
Python
hpmalo, 2018-02-06 12:22:01

How to make a range of receiving messages?

It is required to receive a message from the user in the form of a number in the range from 100000 to 5000000
Output these numbers in a separate file and if the user's answer does not correspond to this range, then write an error message.
I use the telebot library

@bot.message_handler(content_types=['text'])
def gota(m):
    if 1>str(m.text)>10:
        bot.send_message(m.chat.id, 'eee boy')

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir, 2018-02-06
@vintello

1>"IvanOv">10
??????????????

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question