Метод строки isidentifier() поможет узнать, подходит ли данная строка в качестве имени объекта.
Вполне может заменить самостоятельно придуманную регулярку.
>>> 'some_name'.isidentifier()
True
Обычное имя переменной
>>> '私は手紙です'.isidentifier()
True
Юникод в качестве имени тоже доступен
>>> '1_name'.isidentifier()
False
Имя не может начинаться с цифры
>>> '੬_name'.isidentifier()
False
Включая все цифры юникода
>>> 'some name'.isidentifier()
False
Пробелы недопустимы
#basic
🤖 Aqlni shubha ostiga qo‘yadigan kapcha!
Bir dasturchi “I’m Not a Robot” nomli sayt ishga tushirdi. Bu yerda odatdagi kapcha emas, balki inson ekanligingizni isbotlash uchun 48 ta sinovdan o‘tishingiz kerak bo‘ladi.
🔹 Boshlanishida oddiy — yo‘l belgilarini topish kabi topshiriqlar.
🔹 Keyin esa mantiqiy boshqotirmalar, hatto “X va O” o‘yinigacha boradi.
🔹 Har bir keyingi kapcha avvalgisidan qiyinroq.
Jarayon ancha vaqt oladi, diqqat va topqirlikni talab qiladi. Oddiy botlar bunga dosh berolmaydi. Lekin odam ham oxiriga yetgach, o‘zidan so‘raydi: “Buni men qildimmi?” 😄
👉Bizning barcha loyihalar | #captcha
https://altcha.org/
Free, open-source #Captcha alternative
ALTCHA uses a proof-of-work mechanism to protect your website, APIs, and online services from spam and unwanted content.
Unlike other solutions, ALTCHA is free, open-source and self-hosted, does not use cookies nor fingerprinting, does not track users, and is compliant with data-privacy regulations and accessible.