"Ну и как же нам перекидывать строки ви числа?" спросите вы. Проверять каждый символ, очистив строку от лишних знаков и точек. Потом конвертить допустимые символы в числа и восстанавливать знак, дробную чусть и тд???
Самый быстрый способ это просто "попробовать" 😜
text = "-0.3"
try:
num = float(text)
except ValueError:
print('Dough!')
Всё остальное это уже парсинг и разбор символов для иных целей.
#basic
🌳 Hidden Forest & Monkey Kingdom near Durban 🐵
Explore the Hidden Forest Sanctuary in Ballito, where primates roam free in a lush natural haven! Just 40 km (25 mi) north of Durban in KwaZulu-Natal, this gem opened in 2019 and is a must-visit for wildlife lovers.
📍 Ballito, South Africa
🎥 Video: https://www.youtube.com/watch?v=Nfo7xp5YtBE&list=PL6fK0Yu-8iyQTFxtSn5GlKM65_ACMniU3&index=1
#Nature#Monkeys#Travel#SouthAfrica
🌎 In the lush forests of Borneo, the proboscis monkey sports a huge, pendulous nose. This unique feature helps males amplify their calls and attract mates, making it one of nature’s most unusual adaptations for communication. ✨
#borneo⚡#monkeys⚡#evolution
👉subscribe Interesting Planet