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

TGINSIGHT SIMILAR POSTS

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

Изворен канал @pythonotes · Post #254 · 11 јун.

Тип строки в 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

Hashtags

Резултати

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

Пребарај: #nebula

当前筛选 #nebula清除筛选
Nothing Phone (2) | Updates

@NothingPhone2Updates · Post #484 · 09.12.2024 г., 16:44

MistOS - OFFICIAL | Android 15 | Nothing Phone (2) 📝 Details: - Version: v3.0 (Nebula) - Device: #Pong - Released: 09/12/24 ⬇️ Download: Gapps | Vanilla 📖 Changelogs: Device | Source 📔 Installation: Here 🖼 Screenshot : here 🆘 Support: Device 🏷 Tags: #AOSP#ROM#nebula#Official ✍️ Note: • Initial Android 15 • Clean flash recommended • Both Gapps and Vanilla build are available. • Dolby Atmos available. 🏆 Credits: - Chandu and drishal for DT - Hellboy for Meteoric kernel - Fabian & Hellboy for PA Glyph Implementation - Testers - laxus,devsaee and Italian style 😎 Maintainer : @Butterfingers443 x @AgBKartikey 🔔 Updates : @NothingPhone2Updates 💬 Chat : @NothingPhone2

Interesting Planet 🌍

@interesting_planet_facts · Post #1347 · 20.03.2026 г., 12:11

🌎 Giant clouds called molecular clouds are where new stars are born. These clouds, made mostly of hydrogen gas, can stretch for hundreds of light-years. The Orion Molecular Cloud Complex, one of the closest such regions, is located about 1,350 light-years from Earth and is home to thousands of young stars. ✨ #astronomy⚡#stars⚡#nebula 👉subscribe Interesting Planet 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #208 · 02.09.2025 г., 00:11

🪐 In the galaxy NGC 1999, astronomers observed a mysterious, dark patch once believed to be a dense cloud of cosmic dust blocking light. However, further study revealed this region is actually a rare "hole" in the nebula—an empty cavity punched through the glowing gas by powerful stellar winds from young, massive stars, making it a striking example of cosmic sculpting at work. ✨ #nebula⚡#phenomena⚡#astronomy⚡#nasa⚡#galaxy⚡#stars⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries ​

Universe Mysteries 🪐

@cosmomyst · Post #16 · 29.07.2025 г., 20:51

🪐 In the Carina Nebula, the massive star Eta Carinae is surrounded by strange, expanding clouds known as the Homunculus Nebula—vast lobes of gas and dust hurled into space by a series of explosive outbursts in the 19th century. These violent eruptions have sculpted one of the most complex and enigmatic structures ever observed, with glowing filaments and mysterious hidden cavities still being revealed by the Hubble Space Telescope. ✨ #EtaCarinae⚡#nebula⚡#mysteries 👉subscribe Universe Mysteries

Universe Mysteries 🪐

@cosmomyst · Post #61 · 02.08.2025 г., 13:11

🪐 The Egg Nebula (CRL 2688) in Cygnus glows with haunting, layered arcs of dust and gas, shaped by fierce stellar winds from a dying central star. These concentric shells, illuminated by starlight scattered through dense clouds, reveal a dramatic portrait of a Sun-like star in its brief, enigmatic transition into a planetary nebula. ✨ #nebula⚡#stars⚡#transformation⚡#nasa⚡#galaxy⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries

Universe Mysteries 🪐

@cosmomyst · Post #24 · 30.07.2025 г., 00:51

🪐 In the star-forming region of the Orion Nebula, astronomers have identified "proplyds"—dense disks of gas and dust swirling around newborn stars. These proplyds are being sculpted by fierce ultraviolet radiation from nearby massive stars, their bright comet-like tails pointing away from blazing giants such as Theta1 Orionis C. ✨ #Orion⚡#proplyds⚡#nebula 👉subscribe Universe Mysteries

Universe Mysteries 🪐

@cosmomyst · Post #23 · 30.07.2025 г., 00:00

🪐 The Boomerang Nebula in the constellation Centaurus is the coldest known place in the universe, with temperatures dropping to a chilling -272°C—colder than the cosmic microwave background itself. This young planetary nebula expels gas at incredible speeds, creating a ghostly, double-lobed shape that shrouds its dying central star in frigid mystery. ✨ #BoomerangNebula⚡#coldest⚡#nebula 👉subscribe Universe Mysteries

Universe Mysteries 🪐

@cosmomyst · Post #349 · 29.09.2025 г., 20:21

🪐 The star AG Carinae, located about 20,000 light-years away, is a rare example of a "luminous blue variable"—an unstable giant star that can erupt in massive outbursts, shedding huge shells of gas and dust. AG Carinae shines millions of times brighter than the Sun and is surrounded by a glowing nebula created by its violent eruptions, making it one of the most volatile and spectacular stars in our galaxy. ✨ #unusualstars⚡#stellareruption⚡#nebula⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #187 · 25.08.2025 г., 13:11

🪐 In the center of the galaxy NGC 2392, also known as the "Eskimo Nebula," astronomers have detected fast, energetic jets of gas blasting outwards at speeds of over 200 kilometers per second. These jets, launched by the dying central star, punch through surrounding shells of glowing gas, creating intricate, layered patterns that make this nebula one of the most visually stunning and mysterious cosmic objects observed by the Hubble Space Telescope. ✨ #nebula⚡#jets⚡#emission⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries ​

12
ПретходнаСтраница 1 од 2Следна