В продолжение прошлого поста про цифры в мире строк.
Почему методы 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
#XLM/USDT analysis :
#XLM is in an uptrend, trading above the 200-day EMA on the daily timeframe. The price has tested the support zone and 200-day EMA, and it is expected to rebound from the current level and move upside to test higher levels. For a long entry, wait for the price to break above the $0.2760 level.
TF : 1D
Entry : $0.2764
Target : $0.6374
SL : $0.2094
#XLM/USDT analysis :
#XLM is in an uptrend, forming higher highs (HHs) and higher lows (HLs) above the 200 EMA. The price has retested the 200 EMA and is anticipated to rebound, resuming its bullish momentum to test swing high levels. For a long entry, it is recommended to wait for a breakout above the $0.3751 level.
TF : 1D
Entry : $0.3751
Target : $0.6374
SL : $0.2764
#XLM/USDT analysis -
#XLM recently broke above the 200 EMA with strong momentum. The next move might be a retest of this level and a test of the support zone. Look for a pullback near the 200 EMA for a potential long entry. The previous resistance zone could serve as the target level.
TF : 4h
Entry : $0.0937
Target : $0.1198
SL : $0.0863