Метод строки isidentifier() поможет узнать, подходит ли данная строка в качестве имени объекта.
Вполне может заменить самостоятельно придуманную регулярку.
>>> 'some_name'.isidentifier()
True
Обычное имя переменной
>>> '私は手紙です'.isidentifier()
True
Юникод в качестве имени тоже доступен
>>> '1_name'.isidentifier()
False
Имя не может начинаться с цифры
>>> '੬_name'.isidentifier()
False
Включая все цифры юникода
>>> 'some name'.isidentifier()
False
Пробелы недопустимы
#basic
🔥New DEX Integration on the [#TokenPocket] Market page: [@Orbiter_Finance]
🛸Orbiter Finance is a ZK-tech-based instant omni-rollup on Ethereum, delivering secure, efficient, and decentralized data communication services.
✅ With this integration, [@Orbiter_Finance] will bolster cross-chain bridge support and offer [#TokenPocket] users a new route option.
👉https://www.tokenpocket.pro/
[#TokenPocket] [#CrossChainBridges] [#Orbiter]
【Details】https://twitter.com/TokenPocket_TP/status/1760607112785502276
【Powered By】Crypto Box
🔥New DEX Integration on the [#TokenPocket] Market page: [@mesonfi]
✅Starting now, effortlessly bridge the stablecoins on [@BNBCHAIN], [@arbitrum], etc. to [#BTC] on [@MerlinLayer2], etc. directly on the TokenPocket Market page with the seamless cross-chain bridge service from [@mesonfi].
Download and Enjoy
👉https://www.tokenpocket.pro/
[#TokenPocket] [#CrossChainBridges] [#meson]
【Details】https://twitter.com/TokenPocket_TP/status/1767861124576301076
【Powered By】Crypto Box