TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #156 · 2 окт.

Те, кто в Python не первый день, хорошо знают, что на число можно умножить не только число, но и другие типы. Главное, чтобы у этих типов была реализация такой операции. # list >>> [1] * 3 [1, 1, 1] # tuple >>> (2, 3) * 3 (2, 3, 2, 3, 2, 3) # string >>> "A" * 3 "AAA" Так работает полиморфизм стандартных типов. Интересно здесь то, что это сработает и в том случае, когда порядок операндов обратный. То есть int умножить на [тип]. # list >>> 3 * [1] [1, 1, 1] # tuple >>> 3 * (2, 3) (2, 3, 2, 3, 2, 3) # string >>> 3 * "A" "AAA" Если хотите реализовать такое поведение в ваших классах то следует помнить два момента: 1. Если множитель справа, то вам нужно реализовать метод __mul__, наш класс это первый операнд, то есть слева. myType * 3 2. Если множитель слева, то вам нужно реализовать метод __rmul__, наш класс это второй операнд, справа. 3* myType Всё тоже самое можно делать и для других математических операторов. И если в этом примере действие и результат будут фактически одинаковыми, то бывают ситуации, когда это не так. Например, при умножении матриц имеет значение порядок операндов. Для других операторов, таких как деление или сдвиг, очень важно кто с какой стороны находится. >>> 2/4, 4/2 (0.5, 2.0) >>> 2<<3, 3<<2 (16, 12) >>> 100%15, 15%100 (10, 15) #tricks#basic

Резултати

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

Пребарај: #pricedrop

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

@CryptoM · Post #65255 · 12.04.2026 г., 10:55

🚀 Ethereum(ETH) Drops Below 2,200 USDT with a 1.88% Decrease in 24 Hours On Apr 12, 2026, 10:55 AM(UTC). According to Binance Market Data, Ethereum has dropped below 2,200 USDT and is now trading at 2,198.01001 USDT, with a narrowed 1.88% decrease in 24 hours. #Ethereum#ETH#Crypto#USDT#Binance#CryptoNews#PriceDrop#Cryptocurrency

Crypto M - Crypto News

@CryptoM · Post #65204 · 12.04.2026 г., 01:34

🚀 Bitcoin(BTC) Drops Below 73,000 USDT with a 0.20% Decrease in 24 Hours On Apr 12, 2026, 01:34 AM(UTC). According to Binance Market Data, Bitcoin has dropped below 73,000 USDT and is now trading at 72,763.46875 USDT, with a narrowed 0.20% decrease in 24 hours. #Bitcoin#BTC#USDT#Crypto#Cryptocurrency#Binance#MarketUpdate#PriceDrop#CryptoNews

Crypto M - Crypto News

@CryptoM · Post #65307 · 12.04.2026 г., 19:51

🚀 Ethereum(ETH) Drops Below 2,200 USDT with a 5.06% Decrease in 24 Hours On Apr 12, 2026, 19:50 PM(UTC). According to Binance Market Data, Ethereum has dropped below 2,200 USDT and is now trading at 2,199.120117 USDT, with a narrowed 5.06% decrease in 24 hours. #Ethereum#ETH#USDT#Cryptocurrency#CryptoNews#Binance#PriceDrop#MarketUpdate#CryptoTrading#Blockchain

Crypto M - Crypto News

@CryptoM · Post #65286 · 12.04.2026 г., 14:44

🚀 BNB Drops Below 590 USDT with a 2.51% Decrease in 24 Hours On Apr 12, 2026, 14:43 PM(UTC). According to Binance Market Data, BNB has dropped below 590 USDT and is now trading at 589.280029 USDT, with a narrowed 2.51% decrease in 24 hours. #BNB#USDT#Binance#Crypto#Cryptocurrency#PriceDrop#MarketUpdate#Decreasing

Crypto M - Crypto News

@CryptoM · Post #65397 · 13.04.2026 г., 05:02

🚀 XRP's Social Fear Sentiment Reaches High Levels Amid Price Decline Social fear sentiment surrounding XRP has reached its third-highest level in the past two years, according to NS3.AI. The cryptocurrency has experienced a 63% decline over the past nine months. Historically, such high levels of pessimism have increased the likelihood of a rebound. #XRP#Cryptocurrency#CryptoSentiment#MarketDecline#InvestorFear#PriceDrop

Crypto M - Crypto News

@CryptoM · Post #65032 · 10.04.2026 г., 14:48

🚀 Significant NOM Transfer to Centralized Exchange Amid Price Drop On April 10, a substantial transfer of NOM tokens was observed. According to BlockBeats On-chain Detection, an address group holding at least 59% of NOM's circulating supply moved 23% of the tokens, totaling 674 million NOM, to a centralized exchange within the past hour. This transfer coincided with a 25% decline in NOM's price today. The address group is likely responsible for driving a sixfold increase in NOM's value over the past two weeks, from $0.0017 to $0.0126. On April 1, they withdrew 1.72 billion NOM from a centralized exchange using seven wallets, representing 59% of NOM's total circulating supply of 2.9 billion tokens. #NOM#centralizedexchange#tokentransfer#priceDrop#cryptocurrency#blockchain#onchain#crypto#cryptomarket#pricefluctuation#cryptotransfer

Crypto M - Crypto News

@CryptoM · Post #64789 · 10.04.2026 г., 00:04

🚀 OneFootball Club Token Faces Decline in Market Valuation The probability of OneFootball Club's fully diluted valuation (FDV) exceeding $50 million on Polymarket has dropped to 14%, marking a 51% decrease over 24 hours. According to Odaily, this decline follows the announcement made yesterday afternoon on the X platform that OneFootball Club's token, OFC, has officially launched with a current market valuation of $45 million. #OneFootball#Token#MarketValuation#FDV#Polymarket#Crypto#OFC#Web3#Blockchain#CryptoMarket#PriceDrop#ValuationDecline

Venture Village Wall 🦄

@venturevillagewall · Post #3668 · 21.12.2024 г., 13:28

Aptos Price Drop After CEO Exit Aptos' price has fallen over 25% in the last week following the departure of CEO Mo Sheikh. The project will now be led by co-founder and CTO Avery Ching, who Sheikh believes will drive the company's next growth phase. Learn more about Aptos in our educational material and read further insights in this article. #Aptos#Blockchain#Crypto#CEO#PriceDrop#MarketUpdate#Leadership#Growth#Web3#TechDirector#Investment#Decentralization#Fintech#Cryptocurrency#TechNews#Innovation#Finance#Resources#Education#Insights#News

Venture Village Wall 🦄

@venturevillagewall · Post #4328 · 07.03.2025 г., 07:00

Trump Establishes Strategic Bitcoin Reserve Former President Trump has signed an order to create a strategic Bitcoin reserve in the U.S., based on approximately 200,000 BTC confiscated by the government. This reserve will serve as a savings asset, not intended for sale, acting as a digital Fort Knox. Meanwhile, analysts indicate that governments may follow the U.S. lead, reducing the likelihood of Bitcoin bans from regulators. Post-announcement, Bitcoin saw a price drop from $91,000 to $85,000 but has since recovered to $88,000. No altcoins are currently included in the reserve plans. Full details here: Reuters #Bitcoin#crypto#Trumpr#US#Blockchain#Finance#Regulation#Assets#DigitalCurrency#Investments#Savings#Market#Trading#Reserves#Government#FTX#Securities#FortKnox#Economy#PriceDrop#StrategicReserve