В продолжение прошлого поста про цифры в мире строк.
Почему методы 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
#TFUEL/USDT analysis :
#TFUEL is currently forming a symmetrical triangle pattern on the monthly timeframe. The price is showing strong volume, indicating that a breakout from this pattern is likely to occur soon that can continue its upward momentum and test higher levels. A potential gain of around +620% is anticipated from the current level.
TF : 1M
Entry : $0.09330
Target : $0.67520
SL : $0.06149
#TFUEL/USDT analysis :
#TFUEL has bounce back from the support zone and break above the trendline. Price is expected to continue its bullish momentum and test previous highs.
TF : 4h
Entry : $0.06237
Target : $0.06954
SL : $0.05766
#TFUEL/USDT analysis :
#TFUEL is currently consolidating sideways near the resistance zone. The price is unable to break the zone upside and facing resistance. It's expected that the price will continue its bearish momentum from the current zone to test the previous swing low.
TF : 4H
Entry : $0.05740
Target : $0.04363
SL : $0.06297
#TFUEL/USDT analysis -
#TFUEL is in a downtrend on the HTF. The price is expected to continue its momentum, and previous lows will be tested. Before entering a short position, wait for a retracement for entry.
TF : 4H
Entry : $0.06791
Target : $0.06011
SL : $0.07132
#Tfuel Falling Wedge Breakout Has Confirmed Overall Consolidating In Symmetrical Triangle Expecting Move Towards In Descending Trendline In Coming Days And Once Trendline Got Cleared Can Easily Test 0.30$ In Midterm