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

TGINSIGHT SIMILAR POSTS

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

Изворен канал @pythonotes · Post #273 · 26 јул.

В стандартном модуле random есть две очень похожие функции random.randint() random.randrange() Обе возвращают случайное значение из указанного диапазона >>> random.randint(10, 20) 12 >>> random.randrange(10, 20) 17 В чем же отличие? Дело в том что у randrange() есть третий параметр step. randint() действительно возвращает случайное число из указанного диапазона. randrange() на первый взгляд делает тоже самое если передать также два параметра. Но есть указать еще и step то наш диапазон усложняется, то есть в него попадёт не полный ряд значений. Например, я хочу получить случайное значение из диапазона но только чётное число. Тогда достаточно сделать так: >>> randrange(10, 20, 2) 16 Таким образом получается что randint это частный случай randrange без указания параметра step. Еще одно важное отличие в том, что randint() включает в диапазон второе значение а randrange() нет. То есть выражение randrange(10, 20) никогда не вернёт 20, а randint(10, 20) вернёт. #tricks#basic

Резултати

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

Пребарај: #somalis

当前筛选 #somalis清除筛选
Addis Standard

@addisstandardeng · Post #21528 · 26.02.2026 г., 05:18

One-third of #Somalis to face hunger in March: #UN officials Some 6.5 million people, or about a third of Somalia's population, will face crisis levels of hunger through March, an increase of 1.7 million since January, UN officials warned. Speaking to reporters on Wednesday at the UN headquarters via video link, World Food Programme (#WFP) Director of Emergency Preparedness and Response Ross Smith said the latest Integrated Food Security Phase Classification (#IPC) report for Somalia, released on Tuesday, confirmed fears that the humanitarian situation in Somalia has significantly worsened. "Of these, two million of the most vulnerable women and children are expected to face severe hunger," with over 1.8 million children under the age of 5 to face acute malnutrition in 2026, he said. Smith said Somalia is in the midst of a very complex hunger crisis, where two rainy seasons have failed, conflict and insecurity.... https://menafn.com/1110791078/One-Third-Of-Somalis-To-Face-Hunger-In-March-UN-Officials

Addis Standard

@addisstandardeng · Post #22150 · 30.04.2026 г., 10:10

News: #Ethiopian community members in #South_Africa accuse home government of inaction as embassy says engaging authorities Members of the Ethiopian community in South Africa have criticized what they describe as a lack of adequate protection and diplomatic response following recent killings of Ethiopian nationals in Johannesburg, even as #Ethiopia’s embassy in #Pretoria said it is engaging authorities and calling for stronger security measures. The criticism follows a recent shooting in #Johannesburg in which four Ethiopians were killed, with Ethiopian officials saying they are awaiting the outcome of investigations by South African authorities. Speaking to #Addis_Standard on condition of anonymity, a member of the Ethiopian Community in South Africa said the killings of Ethiopians, #Eritreans and #Somalis in South Africa are not new, but warned both the frequency and nature of the attacks appear to be worsening. https://addisstandard.com/?p=56694