"Ну и как же нам перекидывать строки ви числа?" спросите вы. Проверять каждый символ, очистив строку от лишних знаков и точек. Потом конвертить допустимые символы в числа и восстанавливать знак, дробную чусть и тд???
Самый быстрый способ это просто "попробовать" 😜
text = "-0.3"
try:
num = float(text)
except ValueError:
print('Dough!')
Всё остальное это уже парсинг и разбор символов для иных целей.
#basic
There’s a bird that smells like manure. The hoatzin, a bird found in the Amazon rainforest, has earned the nickname “the stinkbird.” Its digestive system ferments leaves the way cows digest grass, producing a strong manure-like smell. Because of this, predators often avoid it—not because it’s dangerous, but because it smells terrible.
@googlefactss#birds
[read more....]
The Argentine lake duck (Oxyura vittata) holds the record for the longest penis of any vertebrate relative to its body size. Males possess a corkscrew-shaped, spiny, and often-retracted organ that can measure up to 20 cm (nearly 8 inches).
@googlefactss#birds