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

Резултати

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

Пребарај: #applerelease

当前筛选 #applerelease清除筛选
Crypto M - Crypto News

@CryptoM · Post #64856 · 10.04.2026 г., 04:43

🚀 Global PC Shipments Expected to Rise by 3.2% in Q1 2026, Omdia Reports According to Jin10, Omdia's latest research indicates that the total shipments of desktops, laptops, and workstations are projected to increase by 3.2% year-on-year in the first quarter of 2026, reaching 64.8 million units. Among these, laptop shipments, including mobile workstations, are expected to see a slight year-on-year growth of 2.6%, reaching 50.8 million units. Desktop shipments, including desktop workstations, are anticipated to perform slightly better, with a year-on-year growth of 5.4%, reaching 14 million units. The growth is primarily driven by manufacturers and channel partners pulling in orders ahead of the widely expected rise in component costs. Additionally, the ongoing Windows 10 replacement cycle continues to drive corporate budget updates, and the concentrated product releases by Windows OEMs and Apple during the spring season are also contributing factors. #PCShipments#TechIndustry#LaptopGrowth#DesktopGrowth#OmdiaReport#Q12026#GlobalMarket#ITHardware#WindowsUpgrade#AppleRelease