Метод строки isidentifier() поможет узнать, подходит ли данная строка в качестве имени объекта.
Вполне может заменить самостоятельно придуманную регулярку.
>>> 'some_name'.isidentifier()
True
Обычное имя переменной
>>> '私は手紙です'.isidentifier()
True
Юникод в качестве имени тоже доступен
>>> '1_name'.isidentifier()
False
Имя не может начинаться с цифры
>>> '੬_name'.isidentifier()
False
Включая все цифры юникода
>>> 'some name'.isidentifier()
False
Пробелы недопустимы
#basic
#HFT/USDT analysis :
#HFT has broken out and retested the previously respected zone. The price is expected to rebound from this level and resume its bullish momentum, aiming to test the previous highs. This indicates a strong potential for upward movement as the market seeks to continue its bullish trend.
TF : 1D
Entry : $0.2230
Target : $0.3200
SL : $0.1770
#HFT/USDT analysis :
#HFT is in downtrend, trading below 200ema. Price is in pullback phase. Let it approach resistance zone and reject from there to downside as previous swing low is expect to be tested.
TF : 15min
Entry : $0.1390
Target : $0.1163
SL : $0.1483