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

Пребарај: #gemswall

当前筛选 #gemswall清除筛选

🪙 TON BuildCon – Defining the Future of TON in 2025! What narratives will shape TON in 2025? What innovations and trends will drive its growth? Let’s find the answers together at TON #BuildCon – an online event by PumpStep & OpenSourceFun, focused on TON Blockchain. 🗓Date: February 12th, 15:00 UTC ➡️Live Twitter Space ➡️Register on Luma What’s on the agenda? ⏺ The $TON Era for #TelegramApps ⏺ Technical Challenges & New Opportunities in TON ⏺ Telegram as an On-Chain Hub for Retail Users 🎙 Featuring industry experts from: #Tonkeeper, #StormTrade, #EVAAProtocol, #GemsWall, and more! ✔️ As an official media partner, we’ll be covering all key insights from the event – stay tuned!

🎁Get your Delea x GemsWallSBT #Gemswall is a quest platform where you can complete tasks, participate in quests, and earn rewards within the Telegram ecosystem. How to get your SBT and share of the $1.5M TON airdrop? ✔️ Go to the Delea quest on GemsWall ✔️ Follow the socials ✔️ Go to Delea App and connect your wallet ✔️ Deposit $20 worth collateral and mint (borrow) 15+ $DONE stablecoin 🏆Pro tip: To boost your rewards, join #TheOpenLeague, where #Delea is competing: Get your SBT badge, earn points for every $20 liquidity position & grab your share of the $1.5M airdrop! 💎Claim your SBT before December 16 — time is runningout! #SBT#stablecoin#LEA#DONE