Метод строки isidentifier() поможет узнать, подходит ли данная строка в качестве имени объекта.
Вполне может заменить самостоятельно придуманную регулярку.
>>> 'some_name'.isidentifier()
True
Обычное имя переменной
>>> '私は手紙です'.isidentifier()
True
Юникод в качестве имени тоже доступен
>>> '1_name'.isidentifier()
False
Имя не может начинаться с цифры
>>> '੬_name'.isidentifier()
False
Включая все цифры юникода
>>> 'some name'.isidentifier()
False
Пробелы недопустимы
#basic
🚀 Excited to announce: @losgamecoin and @bitgertbrise have reached a strategic partnership! 🎉
🤑
@bitgertbrise will leverage its powerful Bitgert Chain to bring unparalleled speed, lowest fees, and top-level security and scalability to the blockchain ecosystem. 💪
🤑
💪
🤑
#LOScoin#Bitgert#Web3
🖤https://x.com/losgamecoin/status/1831327472803336526?s=46
🤑Exciting News from Mappasaurus!
🤑
🔥 We are thrilled to announce a strategic partnership with #Bitgert, a leader in blockchain efficiency!
🦖#Mappasaurus is revolutionizing the mapping landscape with AI-driven and decentralized technology. Partnering with Bitgert enhances our mission to provide innovative, real-time mapping solutions with a focus on accessibility and privacy.
💸#Bitgert stands out with its low gas fee blockchain, perfectly aligning with our goals to enhance scalability and cost efficiency for our users.
💯#BlockchainInnovation#MappingRevolution#CryptoCommunity