"Ну и как же нам перекидывать строки ви числа?" спросите вы. Проверять каждый символ, очистив строку от лишних знаков и точек. Потом конвертить допустимые символы в числа и восстанавливать знак, дробную чусть и тд???
Самый быстрый способ это просто "попробовать" 😜
text = "-0.3"
try:
num = float(text)
except ValueError:
print('Dough!')
Всё остальное это уже парсинг и разбор символов для иных целей.
#basic
France Ligue 1🇫🇷
2026-04-22 17:00 UTC
Paris Saint Germain vs. Nantes
Predicted outcome: Paris Saint Germain✅
Predicted score: 3:0
Actual: Paris Saint Germain 3:0
#PSG#Nantes
#Football#FranceLigue1
El día de ayer en el partido entre Monaco y Nantes, el mediocampista maliense🇲🇱 Mohamed Camara, tapó la bandera gay de su uniforme que la Ligue 1 incluyó como parche buscando promover la inclusión y decirle No a la homofobia🚫🏳️🌈
@Fut_planet⚜️#Monaco🇫🇷#Nantes🇫🇷#Ligue1🇫🇷#Camara⚽️
France Ligue 1🇫🇷
2026-04-19 13:00 UTC
Monaco vs. Auxerre
Predicted outcome: Monaco❌
Predicted score: 2:1
Actual: Draw 2:2
#Monaco#Auxerre
2026-04-19 15:15 UTC
Nantes vs. Stade Brestois 29
Predicted outcome: Draw✅
Predicted score: 1:1
Actual: Draw 1:1
#Nantes#StadeBrestois29
2026-04-19 15:15 UTC
Strasbourg vs. Rennes
Predicted outcome: Draw❌
Predicted score: 2:2
Actual: Rennes 0:3
#Strasbourg#Rennes
2026-04-19 15:15 UTC
Metz vs. Paris FC
Predicted outcome: Draw❌
Predicted score: 1:1
Actual: Paris FC 1:3
#Metz#ParisFC
2026-04-19 18:45 UTC
Paris Saint Germain vs. Lyon
Predicted outcome: Paris Saint Germain❌
Predicted score: 2:1
Actual: Lyon 1:2
#PSG#Lyon
#Football#FranceLigue1