Метод строки isidentifier() поможет узнать, подходит ли данная строка в качестве имени объекта.
Вполне может заменить самостоятельно придуманную регулярку.
>>> 'some_name'.isidentifier()
True
Обычное имя переменной
>>> '私は手紙です'.isidentifier()
True
Юникод в качестве имени тоже доступен
>>> '1_name'.isidentifier()
False
Имя не может начинаться с цифры
>>> '੬_name'.isidentifier()
False
Включая все цифры юникода
>>> 'some name'.isidentifier()
False
Пробелы недопустимы
#basic
@Chatbotcreatorbot
Qué puede hacer este bot?
Con este bot puedes crear tus propios Telegram Chatbots o usar plantillas existentes. No se requieren habilidades de codificación.
Idioma: Inglés
(visto en @BotsGram_cu)
#create, #chat, #development, #dev, #botbuilding
@nashrabot
Qué puede hacer este bot?
Impresionante bot para canales y propietarios de listas de publicidad te ayuda a crear publicaciones enriquecidas, podcasting en muchos canales
Idioma: Inglés
(visto en @BotsGram_cu)
#botfather, #token, #create, #development, #dev, #botbuilding