Тип строки в Python имеет очень много удобных методов. Сегодня пост про два таких метода которые чаще всего используются "однобоко". Это методы startswith() и endswith()
Самый обычный сценарий использования — проверка, начинается ли строка с указанной подстроки?
>>> "some_string".startswith("some")
True
И аналогичная ситуация с зеркальным вариантом этой функции, проверка совпадения с конца
>>> "some_string".endswith("some")
False
Так они используются в большинстве случаев что я видел. Но у этих функций есть еще два варианта использования.
🔸Сравнение нескольких подстрок
Для проверки нескольких подстрок в одной строке обычно вызывают эти функции несколько раз. Но на самом деле достаточно передать кортеж со всеми строками один раз. Если будет хоть одно совпадение то функция вернёт True.
>>>"my_image.png".endswith(("jpg", "png", "exr"))
True
🔸Диапазон поиска
Вторым аргументом можно передать индекс символа с которого следует начать сравнение, а третий аргумент это индекс последнего символа.
>>> ".filename.ext".startswith("file", 1)
True
>>> "file_###.ext".endswith('#', 0, -4)
True
Индексы можно указать отрицательными, что означает отсчёт с конца.
#trics#basic
#Update
Claim Your $CRTR Now
If you’re eligible, you can claim your $CRTR right now.
Act fast.
Link : fandora.ai/claim
Sc (BSC) :
0xb150e91Cb40909F47d45115eE9E90667D807464B
#Update
Pacifica Perp War Competition (Original Article)
There's a Perp War competition going on in Pacifica
You can choose one of the two teams to participate, and the winning team will receive a total of 500,000 points. So, Pacifica users, let's definitely register to participate!
- Total prize pool: 500,000 points
- Duration: ~ March 4th
- Teams: Bulls / Bears (choose one)
- Participation eligibility: Anyone
- Scoring method: (Trading volume ranking + PnL ranking) ÷ 2
* Only trading activities from after registration will be recognized, so please register on the Event tab first 🤲
Go directly to Pacifica
#Update
This week, 150 SafePal x Morpho co-branded X1 hardware wallets will be drawn from users who deposited ≥100 USDT
Meanwhile
• Top 50 depositors get the limited-edition wallet directly
• Depositors with ≥1,000 USDT will share $5,000 in $MORPHO
Huge congrats to all the winners!
#Update on BTC/USDT Analysis-
According to the analysis, after falling more than 30% in just one week, BTC has found support precisely at 49,000.
There are five psychological probabilities following this significant drop:
1. BTC could make a V-shaped recovery from this price level.
2. BTC could consolidate for more than 2-3 weeks before breaking out or breaking down.
3. BTC could break down below 49,000 and resume its downtrend.
4. BTC could initially break down, giving a false signal, and then rise.
5. BTC could consolidate for 2-3 weeks, then give a false breakout or breakdown and move in the opposite direction of breakout or breakdown.
📱│Remini v3.7.1305.202520468 (Pro)
⚙│ Android: 7.0 and up #update
🔔
🅿️ │ Play Store / Official Site Link
━━━━━━━━━━━━━━━━━━━
☑ | Features & Mod Info⭐
◉ Powerful Photo enhancer app in World
◉ Enhance blurry, pixelated photos to HD
◉ Auto recognize > enhance facial details
◉ Unblur photo and make photo clearer
◉ Repair old, blurry, scratched photos
◉ Enhance background and colors
◉ Pro Features Unlocked, No Ads
◉ Multi Languages & CPUs: Arm32/64
⚠️ Video Enhance feature is server-side
✍️ | Release by Mixroot
━━━━━━━━━━━━━━━━━━━
📥Link : CLICK HERE TO DOWNLOAD
━━━━━━━━━━━━━━━━━━━
▶️Tutorial : How To Download Mod
━━━━━━━━━━━━━━━━━━━
🔄Official Channel ➜ @Mixrootmods
📱│Picsart v29.7.7 (Gold / Premium)
⚙ │ Android: 6.0 and up #update
🔔
🅿️ │ Play Store / Official Site Link
━━━━━━━━━━━━━━━━━━━
☑ | Features & Mod Info
✅
◉ The best all-in-one photo & video editor
◉ beautify / drawing tools and more!
◉ No professional experience needed!
◉ Gold / Premium Membership Unlocked
◉ Al Avatar not works as it's server-sided
◉ Sign-in No Required / Bypassed
◉ Multi Languages & CPUs: Arm32/64
⚠️Ai features require login
✍️ | Release by Mixroot
━━━━━━━━━━━━━━━━━━━
📥Link : CLICK HERE TO DOWNLOAD
━━━━━━━━━━━━━━━━━━━
▶️Tutorial : How To Download Mod
━━━━━━━━━━━━━━━━━━━
🔄Official Channel ➜ @Mixrootmods
📱│ SnapTube v7.57.0.75750310 (VIP)
⚙│ Android: 5.0 and up #update
🔔
🅿️ │ Play Store / Official Site Link
━━━━━━━━━━━━━━━━━━━
☑ | Features & Mod Info⭐
◉ Ability to download from many sites
◉ IG, Fb post downloader, Status Saver
◉ Download in multiple resolutions
◉ Download any video as an MP3 file
◉ Explore videos in Ur favorite categories
◉ Pause, Cancel or resume downloads
◉ VIP features unlocked / No ads
◉ Multi Languages & CPUs: Arm32/64
➡️Read Full Mod info (Click here)
✍️ | Release by Balatan
━━━━━━━━━━━━━━━━━━━
📥Link : CLICK HERE TO DOWNLOAD
━━━━━━━━━━━━━━━━━━━
▶️Tutorial : How To Download Mod
━━━━━━━━━━━━━━━━━━━
🔄Official Channel ➜ @Mixrootmods
📱 Truecaller v26.8.6 [Gold] [Mod]
⚙│ Android: 8.0 and up #update
🔔
🅿️ │ Play Store / Official Site Link
━━━━━━━━━━━━━━━━━━━
☑ | Features & Mod Info ⭐
◉ Powerful Caller ID » know who’s calling
◉ Block spam + scam calls and SMS
◉ Stay protected from Scammerscallers
◉ Search for phone numbers with Dialer
◉ Advanced blocking & filtering options
◉ Can Use it as your text messaging app
◉ Know who viewed your profile
◉ Get the Premium badge on your profile
◉ Gold Features Unlocked, No ads
◉ Multi Languages & CPUs: Arm32/64
➡️Read Full Mod info(Click here)
✍️ | Release by Balatan
━━━━━━━━━━━━━━━━━━━
📥Link : CLICK HERE TO DOWNLOAD
━━━━━━━━━━━━━━━━━━━
▶️Tutorial : How To Download Mod
━━━━━━━━━━━━━━━━━━━
🔄Official Channel ➜ @Mixrootmods
📱│Remini v3.7.1299.202520143 (Pro)
⚙│ Android: 7.0 and up #update
🔔
🅿️ │ Play Store / Official Site Link
━━━━━━━━━━━━━━━━━━━
☑ | Features & Mod Info⭐
◉ Powerful Photo enhancer app in World
◉ Enhance blurry, pixelated photos to HD
◉ Auto recognize > enhance facial details
◉ Unblur photo and make photo clearer
◉ Repair old, blurry, scratched photos
◉ Enhance background and colors
◉ Pro Features Unlocked, No Ads
◉ Multi Languages & CPUs: Arm32/64
⚠️ Video Enhance feature is server-side
✍️ | Release by Mixroot
━━━━━━━━━━━━━━━━━━━
📥Link : CLICK HERE TO DOWNLOAD
━━━━━━━━━━━━━━━━━━━
▶️Tutorial : How To Download Mod
━━━━━━━━━━━━━━━━━━━
🔄Official Channel ➜ @Mixrootmods
📱 VPN - Super Unlimited Proxy v2.22.1 (Premium)
⚙│ Android: 8.0 and up #update
🔔
🅿️ │ Play Store / Official Site Link
━━━━━━━━━━━━━━━━━━━
☑ | Features & Mod Info⭐
◉ Worldwide stable and fast servers
◉ Best VPN app for Android device
◉ Secure your all online activities
◉ Remain anonymous online, safe
◉ Hide your ip address and location
◉ Unblock websites & applications
◉ Premium / Paid Features Unlocked
◉ Multi Languages & CPUs: Arm32/64
✍️ | Release by Mixroot
━━━━━━━━━━━━━━━━━━━
📥Link : CLICK HERE TO DOWNLOAD
━━━━━━━━━━━━━━━━━━━
▶️Tutorial : How To Download Mod
━━━━━━━━━━━━━━━━━━━
🔄Official Channel ➜ @Mixrootmods