Метод строки isidentifier() поможет узнать, подходит ли данная строка в качестве имени объекта.
Вполне может заменить самостоятельно придуманную регулярку.
>>> 'some_name'.isidentifier()
True
Обычное имя переменной
>>> '私は手紙です'.isidentifier()
True
Юникод в качестве имени тоже доступен
>>> '1_name'.isidentifier()
False
Имя не может начинаться с цифры
>>> '੬_name'.isidentifier()
False
Включая все цифры юникода
>>> 'some name'.isidentifier()
False
Пробелы недопустимы
#basic
#Elezioni#Francia#Presidenziali
Ségolène #Royal (#PS|S&D): "Congratulazioni a Macron. Ora c'è bisogno di un bilanciamento in parlamento, la sinistra deve unirsi attorno a Mélenchon."
@UltimoraPolitics
👑🇺🇸WHY AMERICANS STILL CRAVE MONARCHY AFTER 250 YEARS OF INDEPENDENCE
🔹 King Charles III visits Washington April 27-30 as Americans show "cultural affection" for royals 🏛️👑
🔹 Americans mourned Queen Elizabeth II as deeply as Britons — "dream of what they're denied" 😢💔
🔹 Royalty offers "grace without power" while presidency gives "power without grace" — contrasting symbols 🤴🆚👨💼
🔹 Trump praised Elizabeth II as "constant symbol" of freedom, showing bipartisan reverence 🙏✨
"Americans love monarchy at least as much as they fear it" — 250 years later, longing remains 🗽❤️
We mastered power but still crave the elegance 💎😍
#monarchy#culture#royal#America
@america