В продолжение прошлого поста про цифры в мире строк.
Почему методы 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
#IOTX/USDT analysis :
#IOTX is currently retracing towards the 200 EMA. The price is anticipated to retest the 200 EMA before continuing its bearish momentum. The current level presents a good opportunity for a long entry, as the 200 EMA is expected to be tested.
TF : 1h
Entry : $0.01860
Target : $0.01973
SL : $0.01790
#IOTX/USDT analysis :
#IOTX is currently bouncing back from the trendline and the 200-period exponential moving average (EMA). This price action suggests a potential upward movement, with expectations to test previous swing high levels. The confluence of the trendline and the 200 EMA provides a strong support area, indicating a bullish outlook for IOTX in the near term.
TF : 4H
Entry : $0.04435
Target : $0.05164
SL : $0.04042
#IOTX/USDT analysis :
#IOTX is currently consolidating sideways near the resistance zone. It is expected to continue its bearish momentum and test the previous swing low.
TF : 2H
Entry : $0.0332
Target : $0.0284
SL : $0.0358
#IOTX/USDT analysis -
#IOTX be currently rejecting from the rejection zone after forming a lower low. It be expected to decline from there and be testing the previous low. A stop loss will be placed above the rejection zone for risk management.
TF : 4h
Entry : $0.0395
Target : $0.0372
SL : $0.0409