В продолжение прошлого поста про цифры в мире строк.
Почему методы isdigit() и isnumeric() не определяют в строке float и отрицательные значения?
Дело в том, что эти методы работают с ЦИФРАМИ, то есть с единичным символом. А строка "-2" или "3.4" это уже ЧИСЛО. То есть не символ а значение, записанное несколькими символами.
Все озвученные методы проходятся по каждому символу строки и проверяют их индивидуально.
В юникоде есть символы цифр с точками "🄀⒈⒉⒊⒋⒌⒍⒎⒏⒐"
Каждая из них это ОДИН СИМВОЛ, поэтому он будет считаться цифрой
>>> '⒌'.isdigit(), '⒌'.isnumeric()
True, True
Но когда мы пишем это выражение в два символа ( 5+точка), то это не работает.
>>> '5.'.isdigit(), '5.'.isnumeric()
False, False
А еще есть такие символы
>>> '⑴⑵⑶⑷⑸'.isdigit()
True
>>> '🄁🄂🄃'.isdigit()
True
Но они не преобразуются в десятичные цифры
>>> '⒈'.isdecimal()
False
>>> '🄃'.isdecimal()
False
>>> '⑶'.isdecimal()
False
#basic
Any form of meningitis is a medical emergency.
Download our latest #CerebrospinalMeningitis situation report for a summary of the disease situation and our response activities
🔗
https://ncdc.gov.ng/diseases/sitreps/?cat=6&name=An%20Update%20of%20Meningitis%20Outbreak%20in%20Nigeria
We have published our latest situation report on #CerebrospinalMeningitis.
This report provides a summary of the current epidemiological situation in Nigeria, and our preparedness and response activities.
🔗https://ncdc.gov.ng/diseases/sitreps/?cat=6&name=An%20Update%20of%20Meningitis%20Outbreak%20in%20Nigeria
#TakeResponsibility
The highest burden of #CerebrospinalMeningitis in Nigeria occurs in the “Meningitis Belt” which includes all 19 states in the Northern region, the FCT, and some southern states.
Ensure you and your loved ones have received the appropriate vaccination required to protect against #meningitis
Public Health Advisory: https://ncdc.gov.ng/news/508/cerebrospinal-meningitis-public-health-advisory
Vaccination is the best prevention measure against #CerebrospinalMeningitis.
Ensure you complete the routine immunisation for your children or wards to keep them safe and #healthy.
#TakeResponsibility
#CerebrospinalMeningitis (CSM) is an easily transmissible disease with confirmed cases reported all year round in Nigeria.
Download our latest #CSM situation report for a summary of the disease situation and our response activities
🔗https://ncdc.gov.ng/diseases/sitreps/?cat=6&name=An%20Update%20of%20Meningitis%20Outbreak%20in%20Nigeria
#TakeResponsibility
Vaccination is the best prevention measure against #CerebrospinalMeningitis.
Ensure you complete Nigeria's routine immunisation schedule for your children or wards to keep them safe and #healthy.
#DefeatMeningitis
Are you familiar with the signs of #Meningitis in ADULTS?
Know the signs and symptoms to report early to a healthcare facility when noticed.
#CerebrospinalMeningitis is a MEDICAL EMERGENCY!
#StaySafeStayHealthy#WorldMeningitisDay
🔗
https://youtu.be/ZhZdin-Cn9s?feature=shared
Vaccination is the best prevention measure against #CerebrospinalMeningitis.
Ensure you complete Nigeria's routine immunisation schedule for your children or wards to keep them #safe from vaccine-preventable diseases.
#DefeatMeningitis
#WorldMeningitisDay