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

Резултати

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

Пребарај: #username

当前筛选 #username清除筛选
BotsGram®

@botsgram_cu · Post #4399 · 03.10.2021 г., 03:22

¿Que puede hacer este bot? @idtousername_bot Este bot puede convertir cualquier ID numérico (ejemplo: 123456789) en un enlace de perfil. También puede ver su ID numérico en este bot. Idiomas: inglés (Visto en @botsgram_cu) #id#username

Hashtags

New Feature Alert: Username Auction on Split.tg! 🚫 With KYC now mandatory on fragment.com, users without KYC were unable to list their usernames for auction. But not anymore! 👍 Now you can start username auctions directly on split.tg — no KYC required. Just a 1% fee. 👍 👍Ready to get started? Visit split.tg/auction and take full control of your Telegram usernames today! #username#NFT#TON#NoKYC

The $17K Mistake: How a Simple Username Sale Became a Nightmare Probably everyone has already heard about fraudulent schemes with anonymous numbers and usernames through the fake website fragment.com✅ but it seems worth reminding again using the example of a situation in which one of our community lost 15k $USDT and 365 $TON Original Yesterday afternoon a guy with the nickname ⚠️@Yennypp⚠️wroteme , with a question about whether I was selling my username@matildasion. I blurted out a price of 200 TON, he agreed and suggested doing everything right away through - Fragment. I wrote to him that I don't have verification on the fragment, to which he replied that if you are making an offer, you don't need it. In general, nothing suspicious, I sent a link to the offer itself, interestingly, it opened only with the included VPN in the form of a Mini App. Then I unlinked my user and followed the link, the Fragment website opened and the price was 212 TON for my user, a timer was also set for 23:59:NN (after this time the offer expires). I started the sales process (as I thought). It suggested linking a wallet (I chose the main Tonkeeper), then it was necessary to confirm the transaction in the keeper, it was displayed as “failed”, I went in again on the same one, I figured in my head that: - “this is the keeper, it’s probably slow” I signed. The result is on the screen. Then this guy asked to confirm the transaction again and offered to add a ton for the commission... Victim's TON-wallet: matildasion.ton This situation once again shows that you need to be more careful when signing a transaction and remember the main signs of a scam: 1. You are offered conditions that are much higher than the market 2. You are being rushed due to some "circumstances" 3. You are offered to make a transaction in a non-standard way under the pretext of a high commission or "for your own convenience" If you want to support the person who suffered in this story, you can donate any amount that is comfortable for you in any tokens to the wallet: UQCevAC0E72kTNqn5QkpCx8fxVvpdCpfzGo753o3Zf80yP2y P.S. we have known each other in absentia for over two years, he has a confirmed merchant on @wallet #scam#fragment#username