Метод строки isidentifier() поможет узнать, подходит ли данная строка в качестве имени объекта.
Вполне может заменить самостоятельно придуманную регулярку.
>>> 'some_name'.isidentifier()
True
Обычное имя переменной
>>> '私は手紙です'.isidentifier()
True
Юникод в качестве имени тоже доступен
>>> '1_name'.isidentifier()
False
Имя не может начинаться с цифры
>>> '੬_name'.isidentifier()
False
Включая все цифры юникода
>>> 'some name'.isidentifier()
False
Пробелы недопустимы
#basic
Bitcoin ETFs See Major Inflow Reversal
On January 15, Bitcoin spot ETFs recorded a net inflow of $755 million, marking the first inflow after four days of outflows. The Fidelity ETF (FBTC) led the charge, attracting $463 million. Meanwhile, Ethereum products also saw inflows, totaling $59.78 million.
Forecasts from HashKey Group predict Bitcoin could hit $300,000 by 2025 and Ethereum $8,000, with overall market cap reaching $10 trillion. Analyst insights suggest the Litecoin ETF may be next for approval in the US.
For more details, visit the link.
#Bitcoin#ETF#Cryptocurrency#Ethereum#Investing#Finance#MarketTrends#HashKey#Litecoin#Fidelity#CryptoForecast#AI#VC