Метод строки isidentifier() поможет узнать, подходит ли данная строка в качестве имени объекта.
Вполне может заменить самостоятельно придуманную регулярку.
>>> 'some_name'.isidentifier()
True
Обычное имя переменной
>>> '私は手紙です'.isidentifier()
True
Юникод в качестве имени тоже доступен
>>> '1_name'.isidentifier()
False
Имя не может начинаться с цифры
>>> '੬_name'.isidentifier()
False
Включая все цифры юникода
>>> 'some name'.isidentifier()
False
Пробелы недопустимы
#basic
Become a United Nations 🇺🇳 Volunteer (UNV is Recruiting)
Apply: https://opportunitiescorners.com/un-volunteer-program/
UNV is recruiting Volunteers from around the World.
The UN Covers Allowance, Accommodation, Meals, Insurance, Travel Expenses, Visa Cost.
#UNV#OpportunitiesCorners
United Nations 🇺🇳 International Volunteer Program 2026
Apply: https://opportunitiescorners.com/united-nations-volunteer-program-2026/
The International Volunteer Program is open to applicants from any country.
Volunteers will receive Living Allowance to cover all the expenses.
#OpportunitiesCorners#Volunteer#UNV