Метод строки isidentifier() поможет узнать, подходит ли данная строка в качестве имени объекта.
Вполне может заменить самостоятельно придуманную регулярку.
>>> 'some_name'.isidentifier()
True
Обычное имя переменной
>>> '私は手紙です'.isidentifier()
True
Юникод в качестве имени тоже доступен
>>> '1_name'.isidentifier()
False
Имя не может начинаться с цифры
>>> '੬_name'.isidentifier()
False
Включая все цифры юникода
>>> 'some name'.isidentifier()
False
Пробелы недопустимы
#basic
🚀🚀Raining Profits in the Premium Group
🎯🎯#PHA/USDT has covered all the targets to give an amazing profit of 557% for all Premium Members
👁🗨Contact @futurechief to enter the premium group & make daily gains on Futures as well as Spot Market
#PHA/USDT analysis :
#PHA has experienced a breakout followed by a retest of the support zone. The price is now anticipated to continue its downward trajectory and test lower levels. This bearish outlook is supported by the breakout and retest pattern, suggesting a potential continuation of the downtrend.
TF : 4H
Entry : $0.1465
Target : $0.1146
SL : $0.1642