TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #84 · 13 мај

В продолжение прошлого поста про цифры в мире строк. Почему методы 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

Hashtags

Резултати

Пронајдени 3 слични објави

Пребарај: #healthyhabits

当前筛选 #healthyhabits清除筛选

#WellnessWednesday: Stay Active. Stay Healthy! 💪🏾 Staying active doesn’t always require a gym membership, sometimes it’s the little things that make the biggest impact! 🚶🏾‍♀️‍➡️ Take the stairs instead of the elevator walking 🙆🏾‍♀️ Stretch during work breaks 🗣️ Engage in quick walks or light conversations with colleagues 🧍🏾‍♀️Stay on your feet while prepping meals or organizing your space These simple movements can help reduce stress, improve mood, boost focus, and support your overall health. Whether you’re at home or at work, every step counts! #Wellnesswednesday#NCDCNigeria#HealthyHabits

#FactFriday: Good Food, Good You! 🥬🥦Adding more fruits and vegetables to your meals can be a game changer for your health. They are filled with Vitamins, Minerals and fiber that helps boost your immunity, Protect your heart and lower the risk of chronic diseases. Healthy eating starts with fruits and Vegetables✅️ #FactFriday#HealthyLiving#HealthyHabits#NCDCNigeria.

#Healthtiip Monday: Clean hands, Healthy You! 💦Regular handwashing with soap under running water or using an alcohol-based sanitizer is one of the most effective ways to protect against infectious diseases, including Ebola. In times of outbreaks, this simple habit can make a big difference. ✅ Every wash helps to break the chain of transmission and keep you, your loved ones, and your community safe. #HealthTipMonday#HealthyLiving#HealthyHabits#NCDCNigeria