Метод строки isidentifier() поможет узнать, подходит ли данная строка в качестве имени объекта.
Вполне может заменить самостоятельно придуманную регулярку.
>>> 'some_name'.isidentifier()
True
Обычное имя переменной
>>> '私は手紙です'.isidentifier()
True
Юникод в качестве имени тоже доступен
>>> '1_name'.isidentifier()
False
Имя не может начинаться с цифры
>>> '੬_name'.isidentifier()
False
Включая все цифры юникода
>>> 'some name'.isidentifier()
False
Пробелы недопустимы
#basic
Channel: GOLD Snipers
Members: ~165.14K
💢 Username: @goldsniipers101
Description:
I hav been trading the markets for more than 9 years. I am here to provide you with the best sniper entries forGOLD signals. Let's beat the markets together If you want to join us before our new session in our VIP GOLD signals text t.me/Goldsniperpips
🏷 Tags: #crypto_fx_trading
#forex#crypto#xauusd#currencies#signals
https://telegramchannels.me/channels/goldsniipers101