Метод строки isidentifier() поможет узнать, подходит ли данная строка в качестве имени объекта.
Вполне может заменить самостоятельно придуманную регулярку.
>>> 'some_name'.isidentifier()
True
Обычное имя переменной
>>> '私は手紙です'.isidentifier()
True
Юникод в качестве имени тоже доступен
>>> '1_name'.isidentifier()
False
Имя не может начинаться с цифры
>>> '੬_name'.isidentifier()
False
Включая все цифры юникода
>>> 'some name'.isidentifier()
False
Пробелы недопустимы
#basic
#LetHerBloom#HerLegacy
🌸 Today, we are coming back with our rubric “Her Legacy”, where we dive into lives of women who changed not only theirs, but millions of other women’s lives.
Bloom will tell you who Malala is, her global impact, her achievements, and why she inspires us.
🪄She is the one who taught us that one voice can change revolutions.
Remember:
✨One spark can cause fire that millions of people cannot stop. Be that spark!
💜 Let’s change the world together! Let’s get the strength and change OUR lives.
And after all,
Let Her Bloom!
🚀Telegram | 📷Instagram
#LetHerBloom#BloomTogether#MentalHealthAwareness#AbusePrevention#HerLegacy
🌸Introducing Bloom’s New Rubric Series🌸
We’re launching a fresh series of posts to raise awareness, educate, and create conversations that matter. Here’s what you’ll see on our page:
✨ Abuse 101 – A breakdown of the different types of abuse.
🚩⏺ Red & Green Flags – What’s healthy vs. what’s harmful in relationships.
🧠 Mental Health Impact – The emotional cost of abuse.
🤝 If You Think Someone’s Being Abused – What to do and how to help.
💐 Her Legacy – Stories of powerful women who changed the world.
🌿 Healthy Boundaries – Why they matter and how to set them.
🎬 Feminism in Media – Representation, reality, and rewriting the narrative.
Stay tuned, stay aware, and let’s keep growing together 🌱💜
🚀Telegram📷Instagram