"Ну и как же нам перекидывать строки ви числа?" спросите вы. Проверять каждый символ, очистив строку от лишних знаков и точек. Потом конвертить допустимые символы в числа и восстанавливать знак, дробную чусть и тд???
Самый быстрый способ это просто "попробовать" 😜
text = "-0.3"
try:
num = float(text)
except ValueError:
print('Dough!')
Всё остальное это уже парсинг и разбор символов для иных целей.
#basic
⚠️ A whale who supplied 56,995 $WETH ($90.8M) to borrow $DAI on #Maker is on the verge of liquidation, with a liquidation price of $1,564.58.
Earlier today, another giant whale was already liquidated for 67,569 $ETH ($106M) at $1,650 to repay a $74.49M loan as the price plunged!
In the past 24 hours, $898M, mostly from long positions, was liquidated from the cryptocurrency market.
Follow @spotonchain for more insights at https://x.com/spotonchain/status/1909075294834848057