Метод строки isidentifier() поможет узнать, подходит ли данная строка в качестве имени объекта.
Вполне может заменить самостоятельно придуманную регулярку.
>>> 'some_name'.isidentifier()
True
Обычное имя переменной
>>> '私は手紙です'.isidentifier()
True
Юникод в качестве имени тоже доступен
>>> '1_name'.isidentifier()
False
Имя не может начинаться с цифры
>>> '੬_name'.isidentifier()
False
Включая все цифры юникода
>>> 'some name'.isidentifier()
False
Пробелы недопустимы
#basic
📊#AKRO pumped with a decent volume after the breakout of the ascending triangle and the MA 200. Currently, it is facing horizontal resistance. A solid breakout of the horizontal resistance would be the bullish confirmation, while a rejection would be a sign of another test of the ascending triangle.
📉
❄️@signals_bitcoin_crypto❄️
❄️@Shadow_support0o❄️