Метод строки isidentifier() поможет узнать, подходит ли данная строка в качестве имени объекта.
Вполне может заменить самостоятельно придуманную регулярку.
>>> 'some_name'.isidentifier()
True
Обычное имя переменной
>>> '私は手紙です'.isidentifier()
True
Юникод в качестве имени тоже доступен
>>> '1_name'.isidentifier()
False
Имя не может начинаться с цифры
>>> '੬_name'.isidentifier()
False
Включая все цифры юникода
>>> 'some name'.isidentifier()
False
Пробелы недопустимы
#basic
Translators in the medical field
#remotely#worldwilde
Albertek Center from The USA is hiring medical interpreters worldwide for #ukrainian, #vietnamese, #portuguese, #cantonese, and #cambodian languages.
If you're passionate about bridging communication gaps in healthcare, we want to hear from you!
Submit your CV: [email protected]
Contact via Telegram: @EliseeRom
===================
Be sure to indicate in your reply that you discovered the vacancy on LinguoHunter.