"Ну и как же нам перекидывать строки ви числа?" спросите вы. Проверять каждый символ, очистив строку от лишних знаков и точек. Потом конвертить допустимые символы в числа и восстанавливать знак, дробную чусть и тд???
Самый быстрый способ это просто "попробовать" 😜
text = "-0.3"
try:
num = float(text)
except ValueError:
print('Dough!')
Всё остальное это уже парсинг и разбор символов для иных целей.
#basic
🤖A unique art exhibition Neuro Conflict will take place in Bali
📍 This weekend from 12 to 14 July, Superlative Gallery in Kuta will host an unusual exhibition called Neuro Conflict. Here you can experience a unique combination of art and modern technology, including neural networks.
🤖 The event will run for three days. The exhibition will feature works by international artists, interactive art installations, fascinating lectures on artificial intelligence, as well as performances and an auction.
@BaliNews
#wheretogo#exhibitions#Kuta
🧉Bali will host the official Arak Day tomorrow
🏝 Arak Day, the local palm vodka, is celebrated tomorrow, January 29.
ℹ️ Arak is a symbol of offering to the gods for a rich harvest, a form of gratitude.
📍 The official event will be held at GWK Park. The “Arak Berem Bali for the World” exhibition will also be held there.
🐲 The organizers of the celebration emphasize that Arak Day in Bali is not about drinking at all. Arak Day celebrations should be understood as a temple festival that is celebrated through prayer, not alcoholism.
@BaliNews
#holidays#events#exhibitions#culture