Метод строки isidentifier() поможет узнать, подходит ли данная строка в качестве имени объекта.
Вполне может заменить самостоятельно придуманную регулярку.
>>> 'some_name'.isidentifier()
True
Обычное имя переменной
>>> '私は手紙です'.isidentifier()
True
Юникод в качестве имени тоже доступен
>>> '1_name'.isidentifier()
False
Имя не может начинаться с цифры
>>> '੬_name'.isidentifier()
False
Включая все цифры юникода
>>> 'some name'.isidentifier()
False
Пробелы недопустимы
#basic
#API3 delivered an incredible 4160% profit in just 5 days
🪙🔥
That's a 4️⃣1️⃣🔤 return on your money from just one signal. This is just a taste of what our private channel delivers daily😉💵
Not going to lie, we have pretty much cracked the crypto code here. The results speak for themselves. Bet you are wondering how... Too bad most won't ever figure it out💯
Want to stay ahead of the game? DM me now!🤝@Kevindexter✅