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

TGINSIGHT SIMILAR POSTS

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

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

Метод строки split() разделяет строку на несколько строк по указанному символу >>> "a_b_c".split('_') ['a', 'b', 'c'] Можно указать максимальное количество разделений >>> "a_b_c".split('_', 1) ['a', 'b_c'] Или резать с другой стороны с помощью rsplit() (right split) >>> "a_b_c".rsplit('_', 1) ['a_b', 'c'] А что будет если оставить аргументы пустыми? >>> "a_b_c".split() ['a_b_c'] Получаем список с одним элементом, потому что по умолчанию используется пробельный символ. >>> "a b c".split() ['a', 'b', 'c'] То есть это равнозначно такому вызову? >>> "a b c".split(" ") ['a', 'b', 'c'] Кажется да, но нет! Давайте попробуем добавить пробелов между буквами >>> "a b c".split(" ") ['a', '', '', 'b', '', '', 'c'] И вот картина уже не так предсказуема 😕 А вот что будет по умолчанию >>> "a b c".split() ['a', 'b', 'c'] Всё снова красиво! 🤩 По умолчанию в качестве разделителя используется любой пробельный символ, будь то табуляция или новая строка. Включая несколько таких символов идущих подряд. А также игнорируются пробельные символы по краям строки. >>> "a\t b\n c ".split() ['a', 'b', 'c'] Аналогичный способ можно собрать с помощью регулярного выражения. Но пробелы по краям строки придется обрабатывать дополнительно. >>> import re >>> re.split(r"\s+", ' a b c '.strip()) ['a', 'b', 'c'] Здесь тоже можно указать количество разделений >>> re.split(r"\s+", 'a b c', 1) ['a', 'b c'] А что если мы хотим написать красиво, то есть split() без аргументов, но при этом указать количество разделений? В этом случае первым аргументом передаём None >>> "a\n b c".split(None, 1) ['a', 'b c'] Данный метод не учитывает строки с пробелами, взятые в кавычки 'a "b c" '.split() ['a', '"b', 'c"'] Но для таких случаев есть другие способы. #tricks#basic

Резултати

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

Пребарај: #ai16z

当前筛选 #ai16z清除筛选
Venture Village Wall 🦄

@venturevillagewall · Post #4101 · 08.02.2025 г., 19:00

Weekly AI News Highlights 🔹 Presearch launches chatbot PreGPT 2.0: Read more 🔹 Sberbank plans collaboration with Chinese researchers on AI projects: Read more 🔹 List of countries restricting Chinese AI DeepSeek prepared: Read more 🔹 Tether's Data department developing various AI applications for Bitcoin wallets: Read more 🔹 Figure creator terminates partnership with OpenAI after AI breakthrough: Read more 🔹 Binance analyzes meme coins and AI tokens market trends: Read more 🔹 Google unveils flagship AI model Gemini 2.0 Pro Experimental: Read more 🔹 AI tokens AI16Z and VVV see significant drop post-Binance listing: Read more 🔹 OpenAI introduces Deep Research mode in ChatGPT: Read more 🔹 List of cheap and free alternatives to OpenAI's Deep Research revealed: Read more #AI#Presearch#Sberbank#DeepSeek#Tether#Figure#Binance#Google#Gemini#AI16Z#VVV#ChatGPT#OpenAI#Crypto#VC#memecoins#tokens#research

Venture Village Wall 🦄

@venturevillagewall · Post #3813 · 07.01.2025 г., 16:00

Major USDC Burn & USDT Transfer News 🔥 50,000,000 #USDC burned at USDC Treasury. Full details here. 🚨 Nearly 500M #USDT transferred from #HTX to Tether Treasury, confirming strong liquidity movements. 🤑 MicroStrategy bought 258,320 BTC for over $22B in 2024, averaging $85,450 per BTC. Potential profit of $14B if BTC reaches $100,000. More info here. 🚀 Czech National Bank considers Bitcoin for reserve asset diversification. Details: link. 🔥 Total market cap for AI tokens approaches $17B, witnessing a 4% increase. Top tokens include #FET, #VIRTUAL, #AI16Z. 🔧 Solana developers aim to resolve scalability issues, targeting optimal performance as user base grows. Learn more here. 💡 Ripple partners with Chainlink to launch #RLUSD in DeFi, currently ranked 724 on CoinGecko with a market cap of $72.2M. 📉 Coinbase premium drops to a 12-month low, signaling potential short-term pressures for Bitcoin with analysts noting need for renewed institutional interest. More details here. #USDC#USDT#MicroStrategy#Bitcoin#Crypto#Ripple#Chainlink#AI#DeFi#Solana#CzechRepublic#Liquidity#MarketCap#Investing#Institutional#Trends#CryptoQuant#RLUSD#VIRTUAL#FET#AI16Z

Venture Village Wall 🦄

@venturevillagewall · Post #3921 · 19.01.2025 г., 13:00

Trump Meme Token Sparks Controversy Discussions intensify over the safety and ethicality of the TRUMP meme token, which has surged to $70. Concerns arise from its tokenomics, where 80% is held by Trump-affiliated firms. The first unlock phase is just three months away. Crypto investor Scott Melker criticizes the project as a money grab. For more insights, check the full article here. #TRUMP#Crypto#AI#Blockchain#Solana#DEX#MemeToken#Tokenomics#Investing#CryptoInvestor#Raydium#Moonshot#DeFi#GenerativeAI#Bittensor#AI16Z#Freysa#AIXBT#Eliza