Метод строки isidentifier() поможет узнать, подходит ли данная строка в качестве имени объекта.
Вполне может заменить самостоятельно придуманную регулярку.
>>> 'some_name'.isidentifier()
True
Обычное имя переменной
>>> '私は手紙です'.isidentifier()
True
Юникод в качестве имени тоже доступен
>>> '1_name'.isidentifier()
False
Имя не может начинаться с цифры
>>> '੬_name'.isidentifier()
False
Включая все цифры юникода
>>> 'some name'.isidentifier()
False
Пробелы недопустимы
#basic
🏨Recommended hotels for the RAREMET-2026 participants
Dear participants of the RAREMET-2026 Congress!
The Congress website contains information about hotels that are ready to receive you on special terms during the event. In this section you will find addresses, promo codes for reservations and their validity periods.
📌 Details are available on our website.
🗓Dates of the Congress: RAREMET-2026 will be held on May 20-22 in Moscow at the RTU MIREA. The organizer is Giredmet JSC.
📱 Subscribe to our channels:
Telegram: t.me/raremet2026
MAX: max.ru/id7707072637_gos22
See you at the main forum of the rare metal industry!
#RAREMET2026#RAREMET2026#hotels#accommodation#participants