Метод строки isidentifier() поможет узнать, подходит ли данная строка в качестве имени объекта.
Вполне может заменить самостоятельно придуманную регулярку.
>>> 'some_name'.isidentifier()
True
Обычное имя переменной
>>> '私は手紙です'.isidentifier()
True
Юникод в качестве имени тоже доступен
>>> '1_name'.isidentifier()
False
Имя не может начинаться с цифры
>>> '੬_name'.isidentifier()
False
Включая все цифры юникода
>>> 'some name'.isidentifier()
False
Пробелы недопустимы
#basic
#AntimicrobialResistance is when medicines like #antimalarials, tetracycline, septrin, and amoxicillin no longer treat diseases they cured previously.
Using antimicrobials "anyhow " is making the treatment of common infections more difficult.
Let us work together to save medicines.
#BeAntimicrobialsAware
#AntimicrobialResistance is when medicines like #antimalarials, tetracycline, septrin,
Amoxycillin no longer treat diseases they cure previously.
Using antimicrobials "anyhow " is making the treatment of common infections more difficult.
#WorldAntimicrobialAwarenessWeek2022
#AntimicrobialResistance is when medicines like #antimalarials, tetracycline, septrin, and amoxicillin no longer treat diseases they cured previously.
Everyone everywhere, including users and non-users of #antimicrobials has a role to play to prevent #AMR.
#BeAntimicrobialsAware