Метод строки isidentifier() поможет узнать, подходит ли данная строка в качестве имени объекта.
Вполне может заменить самостоятельно придуманную регулярку.
>>> 'some_name'.isidentifier()
True
Обычное имя переменной
>>> '私は手紙です'.isidentifier()
True
Юникод в качестве имени тоже доступен
>>> '1_name'.isidentifier()
False
Имя не может начинаться с цифры
>>> '੬_name'.isidentifier()
False
Включая все цифры юникода
>>> 'some name'.isidentifier()
False
Пробелы недопустимы
#basic
In Spain, Good Friday is part of Semana Santa (Holy Week). Cities hold large religious processions.
Groups called brotherhoods organize these events. People wear long robes and pointed hoods. They walk slowly as an act of penance.
Huge floats called “pasos” show scenes from the crucifixion of Jesus. These can weigh over a ton and are carried by teams underneath.
Some cities have music with drums and bands. Others stay completely silent. People also sing emotional songs from balconies.
In Seville, processions can last all night. In Málaga, there is a tradition of pardoning a prisoner. In Valladolid, old sculptures from the 16th and 17th centuries are used.
Traditional foods include torrijas and buñuelos.
🇪🇸🕯️🎭🥁
[Read more 1]
[Read more 2]
@googlefactss
#GoodFriday#SemanaSanta#Spain#Traditions#History#Culture