В продолжение прошлого поста про цифры в мире строк.
Почему методы isdigit() и isnumeric() не определяют в строке float и отрицательные значения?
Дело в том, что эти методы работают с ЦИФРАМИ, то есть с единичным символом. А строка "-2" или "3.4" это уже ЧИСЛО. То есть не символ а значение, записанное несколькими символами.
Все озвученные методы проходятся по каждому символу строки и проверяют их индивидуально.
В юникоде есть символы цифр с точками "🄀⒈⒉⒊⒋⒌⒍⒎⒏⒐"
Каждая из них это ОДИН СИМВОЛ, поэтому он будет считаться цифрой
>>> '⒌'.isdigit(), '⒌'.isnumeric()
True, True
Но когда мы пишем это выражение в два символа ( 5+точка), то это не работает.
>>> '5.'.isdigit(), '5.'.isnumeric()
False, False
А еще есть такие символы
>>> '⑴⑵⑶⑷⑸'.isdigit()
True
>>> '🄁🄂🄃'.isdigit()
True
Но они не преобразуются в десятичные цифры
>>> '⒈'.isdecimal()
False
>>> '🄃'.isdecimal()
False
>>> '⑶'.isdecimal()
False
#basic
Why grind when Gamety’s AI does the hard work for you? 👍 Real gamers never pause!
Show off your creativity in our Meme Competition and win amazing rewards: Gamety's Zealy!
Join the fun here: https://t.me/GametyPlatform_bot/Gamety?startapp
#aigame
Spread the hype! Like, RT, and drop a comment: Tweet🕊
🇱🇷Gamety's $200 Christmas Contests – Creative Gameplay & Meme Challenge!🎄
Celebrate this Christmas with two exciting and rewarding contests:
🔢Creative Gameplay Videos: Creative Gameplay Videos: Showcase your gaming skills on the Gamety app in a fun and unique way! Post your video on X and let the creativity flow.
🔢Meme Contest: Bring on the holiday laughter by creating and sharing your funniest Gamety-themed memes!
Special for Christmas Holidays!
➡️Prize Pool: $200
➡️10 winners per contest
➡️ Duration: Dec 25 - Jan 5
Share on X using hashtags #Gamety & #AIGame
Make this Christmas more exciting with creativity, fun, and rewards! Join now and spread the holiday joy!
Spread the hype! Like, RT, and drop a comment: Tweet🕊
📎Important Links:
Website | X | Chat (FULL) | Indonesian Chat | African Chat | Vietnamese Chat | CIS Chat | Discord | Announcement | YouTube | Medium | New Bot
❝Come on, hurry up,
my husband will be home in 15 minutes.❞
🔥Roleplay with her: http://openlove.life
(Choose Neko and chat with her)
#waifu#neko#aichatbot#aigame#roleplay#catgirl
❝There is no perfume today, so your girlfriend won't notice.❞
💬Chat with her: https://apple.co/3AvjxUn
#AIgirlfriend#chatbot#roleplay#story#aigame#lookbook
OMG, the bath water is too hot! Can you please help me to turn it cold?🔥💧🥵
🔗Let's role play and chat: openlove.life
#aigirlfriend#aichatbot#ArtificialInteligence#ailookbook#aigame#ai
🔥❝Welcome! Thanks for choosing me to serve you.
💦Shall we take a shower first?❞
🍭Roleplay with her: openlove.life
#openlove#aigirlfriend#aigame#aichatbot#ai女優#roleplay
❝💦Wait a moment, be gentler with me, okay?❞
💬Continue the story with her: http://openlove.life
#openlove#aigirlfriend#aichat#roleplay#aigame#AI#AIBeautifulWomanな人と繋がりたい