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

Резултати

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

Пребарај: #securitize

当前筛选 #securitize清除筛选
NEWS 鏈新聞-ABMedia

@abmedia_news · Post #24394 · 06.05.2026 г., 02:30

【📜 政策監理|Securitize 獲 FINRA 批准,攜手 Jump、Jupiter 在 Solana 推受監管鏈上股票交易】 #DeFi#FINRA#Securitize Securitize 獲准成為首家託管證券的 broker-dealer,在 Solana 建立鏈上市場堆疊。 獲 FINRA 批准後,平台支援與穩定幣 atomic swaps,由 Jump 提供二級市場流動性。該方案消除傳統結算風險,使代幣化股票具備真實交易能力。 📍閱讀全文: https://abmedia.io/securitize-jump-trading-jupiter 📍 訂閱鏈新聞頻道:https://linktr.ee/abmedia.io

Crypto M - Crypto News

@CryptoM · Post #64995 · 10.04.2026 г., 13:15

🚀 Securitize Integrates Tokenized Assets with TRON Network Securitize, a platform specializing in the tokenization of real-world assets (RWA), has announced its integration with the TRON network. According to Foresight News, this development enables Securitize to introduce its tokenized funds and securities onto the TRON blockchain. This integration marks a significant step in expanding the accessibility and functionality of tokenized assets within the blockchain ecosystem. #Securitize#Tokenization#TRON#Blockchain#RWA#DigitalAssets#CryptoIntegration#TRX

Crypto M - Crypto News

@CryptoM · Post #64710 · 09.04.2026 г., 15:29

🚀 Securitize Appoints Brett Redfearn as President Amid $3.9 Billion Tokenized Asset Management Securitize has announced the appointment of Brett Redfearn, a former executive at the SEC and JPMorgan, as its new president. According to NS3.AI, Redfearn will also join the company's board of directors. This strategic move comes as Securitize manages $3.9 billion in tokenized assets, based on data from RWA.xyz. Redfearn's extensive experience in financial regulation and asset management is expected to bolster Securitize's leadership team and enhance its operations in the rapidly evolving digital asset sector. #Securitize#BrettRedfearn#TokenizedAssets#DigitalAssets#AssetManagement#FinancialRegulation#Leadership#Blockchain#FinTech

Crypto M - Crypto News

@CryptoM · Post #65049 · 10.04.2026 г., 16:29

🚀 Securitize's Potential Market Impact Highlighted by Benchmark Securitize is poised for significant growth as it prepares to go public through a merger with Cantor Equity Partners II, trading under the ticker SECZ. According to NS3.AI, Benchmark has reiterated a $16 price target for SECZ, emphasizing that capturing just one basis point of the approximately $44 trillion market value of NYSE-listed companies could more than double Securitize's current platform assets, which are roughly $4 billion. #Securitize#MarketImpact#IPO#CantorEquityPartners#SECZ#NS3AI#Benchmark#NYSE#Finance#Investment#StockMarket#Growth