Метод строки isidentifier() поможет узнать, подходит ли данная строка в качестве имени объекта.
Вполне может заменить самостоятельно придуманную регулярку.
>>> 'some_name'.isidentifier()
True
Обычное имя переменной
>>> '私は手紙です'.isidentifier()
True
Юникод в качестве имени тоже доступен
>>> '1_name'.isidentifier()
False
Имя не может начинаться с цифры
>>> '੬_name'.isidentifier()
False
Включая все цифры юникода
>>> 'some name'.isidentifier()
False
Пробелы недопустимы
#basic
🚨 Freedom for Palestinian journalist Mustafa Ayyash 🚨
Austria is forcibly detaining Mustafa Ayyash since his arrest, without any judicial ruling, and has disabled his social media accounts to silence his voice.
A Palestinian journalist, a voice for Gaza and Palestine, now needs our voices.
📢 We demand immediate disclosure of his safety and his immediate release!
#Prisoners
#FreedomForMustafaAyyash
#ExecutionOfPalestinianPrisoners
#PrisonersExecutionLaw
O Allah, grant relief to all Muslim prisoners and restore their freedom and safety swiftly, not delayed.
#Prisoners
#FreedomForMustafaAyash
#ExecutionOfPalestinianPrisoners
#ExecutionOfPrisoners
#FreeMustafaAyash
#FreedomForMustafaAyashFromAustrianPrisons
O Allah, grant relief to all Muslim prisoners, and restore to them freedom and safety without delay.
#Prisoners
#FreedomForMustafaAyyash
#ExecutionOfPalestinianPrisoners
#PrisonersExecutionLaw
#freemustafaayash
#FreedomForMustafaAyyashFromAustrianPrisons
#ExecutionLaw
Be Daraa, protecting the prisoners and those released.
#PrisonersAndReleasedFriday
#PrisonersAreARedLine
#WeWillOpenOurAlAqsa
#SaveThePrisoners
#Prisoners
#FreedomForMustafaAyash
#ExecutionOfPalestinianPrisoners
#ExecutionOfPrisoners
#FreeMustafaAyash
#FreedomForMustafaAyashFromAustrianPrisons