Метод строки isidentifier() поможет узнать, подходит ли данная строка в качестве имени объекта.
Вполне может заменить самостоятельно придуманную регулярку.
>>> 'some_name'.isidentifier()
True
Обычное имя переменной
>>> '私は手紙です'.isidentifier()
True
Юникод в качестве имени тоже доступен
>>> '1_name'.isidentifier()
False
Имя не может начинаться с цифры
>>> '੬_name'.isidentifier()
False
Включая все цифры юникода
>>> 'some name'.isidentifier()
False
Пробелы недопустимы
#basic
Be a hero, save lives🩸
Participate in the Voluntary #BloodDonation Poster Making Contest on #MyGov and raise awareness about the importance of donating blood.
Visit: https://mygov.in/task/poster-making-contest-voluntary-blood-donation/
#BloodDonation#savelives#donateblood
Be a hero, save lives🩸💉
Participate in the Voluntary #BloodDonation Poster Making Contest on #MyGov and raise awareness about the importance of donating blood.
#BloodDonation#savelives#donateblood
#committosavinglives2023
Visit: https://www.mygov.in/task/poster-making-contest-voluntary-blood-donation/
On Sunday, February 23, 2025, we will be holding a blood donation, dog adoption, and fundraising program in collaboration with Ahadu Rotaract Club at the Red Cross compound around Addis Ababa Stadium starting 9AM
To those who want to donate:
- Food (Rice) for feeding purpose
- Pet beds
- Comfy blankets
- Medications
- Pet toys
- Dry pet foods
- pet accessaries
We will gladly be waiting, the program will be held until 5pm. Come, save lives by donating blood, create a family by adopting dogs!
#BloodDonation#DogAdoption#CommunityService#AddisAbaba#Ethiopia#SaveLives#GiveBack#AnimalRescue#Rotaract#AhaduRotaract#Fundraising#CharityEvent
https://t.me/starvetbooks