В продолжение прошлого поста про цифры в мире строк.
Почему методы 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
🚀🚀 Storming Profits in the Premium Group
🎯🎯#GUN/USDT has covered all the targets to give an amazing profit of 51% for all Premium Members
👁🗨Contact @futurechief to enter the premium group & make daily gains on Futures as well as Spot Market
🎯🎯Excellent 51% Profit on #GUN/USDT for all Premium Members
🚀🚀It has crossed all the targets
👁🗨Contact @futurechief to enter the premium group & make daily gains
🚀 Back to Back Huge Profits are made in the Premium Group
🎯🎯#GUN/USDT has covered all the target to give a Profit of 201% to all Premium Members
👁🗨Contact @futurechief to enter the Premium Futures & SPOT Group for daily gain
📈 TRADE RESULT – #GUN/USDT
✔️ Entry worked well
✔️ All targets were reached
✔️ Risk was managed properly
Result: +64% (with leverage)
How we trade:
• Plan before entering
• Fix targets and stop-loss
• No emotional trading
Premium means smart and disciplined trading.