Метод строки isidentifier() поможет узнать, подходит ли данная строка в качестве имени объекта.
Вполне может заменить самостоятельно придуманную регулярку.
>>> 'some_name'.isidentifier()
True
Обычное имя переменной
>>> '私は手紙です'.isidentifier()
True
Юникод в качестве имени тоже доступен
>>> '1_name'.isidentifier()
False
Имя не может начинаться с цифры
>>> '੬_name'.isidentifier()
False
Включая все цифры юникода
>>> 'some name'.isidentifier()
False
Пробелы недопустимы
#basic
🔰#BCH Update - Price is pushing higher after the recent bounce.
Keeping a close watch on $603, which remains a key upside target on this leg up, as it aligns with the yearly open — a significant level that often acts as strong resistance.
🔰#BCH Update - Price is pushing higher after the recent bounce.
Keeping a close watch on $603, which remains a key upside target on this leg up, as it aligns with the yearly open — a significant level that often acts as strong resistance.
✅✅ 30% Profit on #BCH/USDT for our Premium Members on Binance Futures/Bybit/OKX & KuCoin
👁🗨Contact @primemod to enter the premium group & make daily gains on Futures/Bybit/OKX/Kucoin & Bitget market
✅✅ 38% Profit on #BCH/USDT for our Premium Members on Binance Futures/Bybit/OKX & KuCoin
👁🗨Contact @primemod to enter the premium group & make daily gains on Futures/Bybit/OKX/Kucoin & Bitget market