В стандартном модуле 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
#TRON
TRON DAO расширяет академическую программу
TRON DAO объявила о расширении инициативы TRON Academy и сотрудничестве с университетами: Dartmouth College, Princeton University, University of Oxford и University of Cambridge.
Программа направлена на поддержку студенческих блокчейн-сообществ, проведение хакатонов, образовательных мероприятий и развитие исследований в сфере Web3.
Инициатива усиливает присутствие экосистемы TRON в академической среде и ориентирована на долгосрочное привлечение разработчиков.
Just In: Tether has minted $1B $USDT on the #Tron Network.
They have minted $2B $USDT on #Tron in 2026.
https://intel.arkm.com/explorer/entity/tether
https://x.com/OnchainLens/status/2013622137429598705
Follow @onchainlens for more onchain updates
Just In: Tether has minted $1B $USDT on the #Tron Network.
They minted for the first time in 2026.
https://intel.arkm.com/explorer/entity/tether
https://x.com/OnchainLens/status/2009583998067220592
Follow @onchainlens for more onchain updates
Just In: Tether has minted $1B $USDT on the #Tron Network. In 2025, they minted $26B $USDT on @trondao. https://x.com/OnchainLens/status/2006009190461198524 Follow @onchainlens for more onchain updates
Just In: Tether has minted $1B $USDT on the #Tron Network.
In 2025, they minted $26B $USDT on @trondao.
https://x.com/OnchainLens/status/2006009190461198524
Follow @onchainlens for more onchain updates
💸 More Subsidies, Smoother Transfers!
TokenPocket has officially increased the monthly TRON transfer subsidy pool — giving more users the chance to enjoy gas-free transactions on @trondao.
✅ No $TRX? No problem — TP covers it!
✅ Seamless experience for new and active users.
✅ Available across all #TRON addresses in TokenPocket.
Start sending with zero hassle and enjoy effortless transfers today! 👉tp.xyz
💙 With TokenPocket, Discover More on TRON.
> Experience seamless integration with the TokenPocket Chrome Extension on the #TRON network.
👉https://extension.tokenpocket.pro
JustLend DAO is TRON's leading DeFi platform, offering lending, staking, and more native TRON services with over $7.6B TVL.
Now, with TokenPocket, you can seamlessly access JustLend DAO through the TokenPocket Chrome Extension on TRON.
Manage your assets, stake $TRX, and maximize your DeFi experience—all in one place!🚀
Now you can use $USDT to cover TRON gas fees on TokenPocket!
Check out how Cointelegraph introduces this feature! #TRON👇
https://cointelegraph.com/news/no-trx-no-problem-tron-network-wallet-uses-usdt-for-transaction-fees
❓What's the best way to save gas costs on TRON?
🎯Pro Tip: Enable TokenPocket's TRON Energy Rental Service.
e.g. ⤵️
Before: 27.25 $TRX For One Transaction
After: 7.71 $TRX For One Transaction
✅Save 72.95% on Gas Costs!
TokenPocket's TRON Energy Rental Service can help you save up to 75% on gas costs on TRON of each transaction! $TRX #TRON
🔴Save Gas Anytime, Anywhere!
TokenPocket TRON Energy Rental service is available for all the DApps live on TRON!
🎯No matter what interactions you make on TRON, you can use the #TRON Energy Rental service to Save $TRX, which can help you save up to 75% on gas costs!
Guide👉https://help.tokenpocket.pro/en/wallet-faq-en/tron-wallet/energy-rental