Метод строки isidentifier() поможет узнать, подходит ли данная строка в качестве имени объекта.
Вполне может заменить самостоятельно придуманную регулярку.
>>> 'some_name'.isidentifier()
True
Обычное имя переменной
>>> '私は手紙です'.isidentifier()
True
Юникод в качестве имени тоже доступен
>>> '1_name'.isidentifier()
False
Имя не может начинаться с цифры
>>> '੬_name'.isidentifier()
False
Включая все цифры юникода
>>> 'some name'.isidentifier()
False
Пробелы недопустимы
#basic
Most of the signals today will be in Vip section
Join #Vip pin and unmute
$100 lifetime promo
Lets start the day with more USD okay? Tap tap 🔥 if you guys are ready.
To Join click on the pinned message and contact admin
Most of the signals today will be in Vip section
Join #Vip pin and unmute
$100 lifetime promo
Lets start the day with more USD okay? Tap tap 🔥 if you guys are ready.
To Join click on the pinned message and contact admin
Most of the signals today will be in Vip section
Join #Vip pin and unmute
Lets start the day with more USD okay? Tap tap 🔥 if you guys are ready.
To Join click on the pinned message and contact admin