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

TGINSIGHT SIMILAR POSTS

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

Изворен канал @pythonotes · Post #146 · 16 сеп.

Функция sub в regex может принимать функцию в качестве аргумента repl. 📄 Из документации: If repl is a function, it is called for every non-overlapping occurrence of pattern. The function takes a single match object argument, and returns the replacement string. То есть для каждого совпадения будет вызвана функция для вычисления замены вместо замены на одну и ту же строку для всех совпадений. Иными словами, для замены разных совпадений на разные строки не потребуется запускать re.sub() много раз для каждой строки замены. Достаточно определить функцию, которая вернёт строку для каждого из совпадений. Описание слишком запутанное🤔, давайте лучше рассмотрим на простом примере: Создаем карту замены. То есть какие строки на какие требуется менять. remap = { 'раз': '1', 'два': '2', 'три': '3', 'четыре': '4', 'пять': '5', } Пишем функцию поиска строки для замены. Единственным аргументом будет объект re.Match. Используя данные этого объекта мы вычисляем замену on-the-fly! def get_str(match: re.Match): word = match.group(1) return remap.get(word.lower()) or word Пример текста. text = '''Раз Два Три Четыре Пять Вместе будем мы считать Пять Четыре Три Два Раз Мы считать научим вас ''' Теперь запускаем re.sub и вместо строки замены (repl) подаём имя функции. (Данный паттерн ищет отдельные слова в тексте) >>> print(re.sub(r'(\w+)', get_str, text)) 1 2 3 4 5 Вместе будем мы считать 5 4 3 2 1 Мы считать научим вас Думаю, достаточно наглядно 🤓 #libs#regex

Hashtags

Резултати

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

Пребарај: #ishares

当前筛选 #ishares清除筛选

Lookonchain | ꘜ Aug 13 Update: 10 #Bitcoin ETFs NetFlow: +917 $BTC(+$111.85M)🟢 #iShares(Blackrock) inflows 931 $BTC(+$113.59M) and currently holds 744,540 $BTC($90.83B). 9 #Ethereum ETFs NetFlow: +124,431 $ETH(+$582.96M)🟢 #iShares(Blackrock) inflows 70,802 $ETH($331.71M) and currently holds 3,270,483 $ETH($15.32B). https://x.com/lookonchain/status/1955298316041982211

Lookonchain | ꘜ Aug 12 Update: 10 #Bitcoin ETFs NetFlow: +1,586 $BTC(+$189.72M)🟢 #iShares(Blackrock) inflows 1,158 $BTC(+$138.58M) and currently holds 743,609 $BTC($88.97B). 9 #Ethereum ETFs NetFlow: +231,717 $ETH(+$1.03B)🟢 #iShares(Blackrock) inflows 149,168 $ETH($663.05M) and currently holds 3,199,681 $ETH($14.22B). https://x.com/lookonchain/status/1954903054597455910

Lookonchain | ꘜ Aug 11 Update: 10 #Bitcoin ETFs NetFlow: +3,308 $BTC(+$396.03M)🟢 #iShares(Blackrock) inflows 3,089 $BTC(+$369.73M) and currently holds 742,451 $BTC($88.88B). 9 #Ethereum ETFs NetFlow: +112,031 $ETH(+$470.76M)🟢 #iShares(Blackrock) inflows 62,936 $ETH($264.46M) and currently holds 3,050,513 $ETH($12.82B). https://x.com/lookonchain/status/1953811766271717410

SIGNAL

@finsignal · Post #3170 · 30.05.2024 г., 03:14

🐂🐂🐂🐂🐂🐂 According to analysts, a BTC-ETF called #iShares Bitcoin Trust from #BlackRock has surpassed #GTC from Grayscale in terms of the number of coins at its core. Accordingly, it is now the largest #BTC spot exchange-traded fund in the United States. Bloomberg analyst Eric Balchunas confirmed the leadership of the #BlackRock iShares Bitcoin Trust (BUT) among spot BTC ETFs. Recall that this exchange-traded fund bypassed Grayscale's GTC based on the trading results for the last day. As Eric noted, BlackRock is likely to occupy the top spot "for decades." The reason is a combination of low fees, serious liquidity and the excellent reputation of the iShares brand. 🐂🐂🐂🐂🐂🐂

Lookonchain | ꘜ Aug 14 Update: 10 #Bitcoin ETFs NetFlow: +452 $BTC(+$53.9M)🟢 #ARK21Shares inflows 299 $BTC(+$35.62M) and currently holds 45,656 $BTC($5.44B). 9 #Ethereum ETFs NetFlow: +154,179 $ETH(+$724.02M)🟢 #iShares(Blackrock) inflows 105,900 $ETH($497.3M) and currently holds 3,376,382 $ETH($15.86B). https://x.com/lookonchain/status/1955636055992049670

Crypto M - Crypto News

@CryptoM · Post #65251 · 12.04.2026 г., 10:15

🚀 Bitcoin ETFs See Strong Inflows as Market Interest Grows US spot Bitcoin ETFs experienced significant net inflows exceeding $786 million last week, marking their most robust performance since February. According to NS3.AI, BlackRock's iShares Bitcoin Trust attracted approximately $612 million. Meanwhile, Morgan Stanley's newly launched MSBT fund garnered around $46 million within its initial three trading days. #Bitcoin#ETFs#BlackRock#MorganStanley#CryptoInvestment#MarketInterest#MSBT#iShares#Inflow#BTC