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 слични објави

Пребарај: #arvr

当前筛选 #arvr清除筛选
Venture Village Wall 🦄

@venturevillagewall · Post #4143 · 13.02.2025 г., 19:00

Steve Yun Speaks at Consensus HK On February 20, Steve Yun from TON Foundation will present at Consensus HK, discussing 'Emerging Markets on the Road to Financial Freedom.' Join to explore DeFi's future and the impact of evolving regulations on Web3. Details here. ⚡️ OpenSea announces OS2 beta version and airdrop. Read more 🚓 In Thailand, Russians arrested for stealing Bitcoin worth $16.5 million. Read more 🧠 A look into the Metaverse and AR/VR projects you might have missed. Read more 🐋 VanEck says some US states will buy $23.5 billion in Bitcoin. Read more 👀 A new Bitcoin-ETF linked structured bond launches in Russia. Read more 🧐 JPMorgan identifies condition for Tether's compliance with US regulations. Read more ❌ Illegal Bitcoin farm shut down near Irkutsk. Read more 🤖 Sam Altman discusses features of GPT-4.5 and GPT-5. Read more 💫 BNB recovered losses following 2025 roadmap release. Read more 🔎 Ethereum Foundation allocates $120 million to DeFi protocols. Read more 👾 WLFI co-founder's X-account hacked to promote a scam. Read more 🔥 Former Greek finance minister criticizes Bitcoin maximalists. Read more #Finance#DeFi#Web3#Bitcoin#OpenSea#Crypto#Ethereum#EthereumFoundation#Cryptocurrency#Blockchain#Thailand#Regulation#CryptoNews#SamAltman#AI#Innovation#Technology#Investment#Metaverse#ARVR#VanEck