Метод строки isidentifier() поможет узнать, подходит ли данная строка в качестве имени объекта.
Вполне может заменить самостоятельно придуманную регулярку.
>>> 'some_name'.isidentifier()
True
Обычное имя переменной
>>> '私は手紙です'.isidentifier()
True
Юникод в качестве имени тоже доступен
>>> '1_name'.isidentifier()
False
Имя не может начинаться с цифры
>>> '੬_name'.isidentifier()
False
Включая все цифры юникода
>>> 'some name'.isidentifier()
False
Пробелы недопустимы
#basic
🧬Welcome to RGB World!! 🧬
🎟Want to get the ticket to RGB's Ecosystem?🎟
Join Now👉https://app.galxe.com/quest/iVUN3rpKWghejAxArpB9Xy/GCS9Xtg79w
💰You will share a 520,000 $RNA Airdrop Prize Pool and experience the amazing opportunities BiHelix_ has in store for you in the coming weeks! 🪂🪂
#Bitcoin $BTC #UTXO#Giveaways2024
CELL Studio Secures Series A Funding
CELL Studio, a modular Bitcoin layer 2 platform, has successfully closed its Series A funding round with contributions from UTXO Management, CMS Holdings, and PAKA. The amount raised remains undisclosed.
!Funding Round
#Funding#Bitcoin#Layer2#CELLStudio#UTXO#Cryptocurrency#CMSHoldings#PAKA