В стандартном модуле 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
📊📊Can Circle handle the $USDC withdrawal on Monday when the banks are open? Let's review some stats
➡️CEX USDC Balances: total 7.189B
Top 3:
1. #Binance : 5.16B
2. #cryptocom: 785M
3. #Okx: 421M
➡️Netflow to CEX is also increasing over the hours in the past 2 days.
Dune link:https://dune.com/spotonchain/spotonchain-cex-usdc-flow
😎 Trump launches #ETF without #Coinbase
Trump Media has announced a partnership with Crypto.Com to launch the #ETF line, it will include cue ball and “pro—American” assets, all under the “Made in America” brand
Why #CryptoCom was chosen, and not #Coinbase — through which $529,325BTC has already passed in an ETF — remains a question.
Bitcoin Drops Below $97,000
Bitcoin fell below $97,000 during the night. Liquidation volumes topped $625 million within 24 hours. In Kazakhstan, regulators have blocked over 3,500 illegal crypto exchanges, including Coinbase, for violating digital asset laws. On January 7, the Bitcoin spot ETF net inflow reached $52.39 million, while BlackRock's ETF IBIT saw $596 million in inflow, bringing the total net asset value of Bitcoin spot ETFs to $110.115 billion. Additionally, a large transfer of 250,080,000 #CRO ($36.78M) was made from #CryptoCom to an unknown wallet.
#Bitcoin#Crypto#Kazakhstan#ETF#CRO#CryptoCom#WhaleAlert#Finance#MarketUpdate#Liquidation#News#Blockchain#Regulators#Assets#Investment#DigitalAssets#CryptoNews#MarketTrends#CryptoExchange#CryptoRegulation
Major Crypto Movements and Developments
🚨 1,823,409 #SOL ($274M) transferred to Coinbase Institutional. Whale Alert details multiple transfers.
ANTHROPIC achieves $61.5B valuation; former FTX stake now worth $5B.
Michael Saylor predicts Bitcoin market cap could reach $20-$200 trillion. His company paused BTC purchases; only 904 BTC away from 500,000 total.
ZKnox launches with Ethereum Foundation support, focusing on post-quantum cryptography to enhance Ethereum security.
Congressmen Emmer & Torres establish 'Congressional Crypto Caucus' for pro-crypto legislation.
Crypto.com’s Cronos protocol debates reissuing 70B burned CRO tokens; community vote shows over 86% against the proposal.
Links: ZKnox Launch, Cronos Proposal
#SOL#Bitcoin#Crypto#AI#Ethereum#ZKnox#Congress#Legislation#Caucus#ANTHROPIC#FTX#CRO#CryptoCom#PostQuantum#Security#Efficiency#Strategy#NFT#DeFi#MarketCap