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

TGINSIGHT SIMILAR POSTS

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

Изворен канал @pythonotes · Post #418 · 9 мар.

Оператор pipe позволяет писать более компактный код, реализуя логику объединения данных (Union). Важно помнить, что его поведение зависит от контекста. Побитовые операции (логическое OR) result = 5 | 3 # 5 (0101) | 3 (0011) = 7 (0111) Самое главное - не путать с оператором or, это другое! Объединение множеств set_a = {1, 2, 3} set_b = {3, 4, 5} set_c = set_a | set_b # {1, 2, 3, 4, 5} set_c |= {5, 6} # {1, 2, 3, 4, 5, 6} Слияние словарей dict_1 = {"a": 1, "b": 2} dict_2 = {"b": 3, "c": 4} merged = dict_1 | dict_2 # {'a': 1, 'b': 3, 'c': 4} merged |= {"d": 5} # {'a': 1, 'b': 3, 'c': 4, 'd': 5} Аннотации типов, заменяет Union def process_data(value: int | str) -> None: print(value) Допустимо использовать в isinstance или issubclass isinstance(3, int | float) # True Паттерн-матчинг status_code = 404 match status_code: case 200 | 201 | 204: print("OK") case 400 | 404 | 500: print("ERROR") Для использования в своих классах требуется переопределить метод __or__ Так же нашел библиотеку pipe которая добавляет еще много возможностей. Рекомендую ознакомиться ;) #basic

Hashtags

Резултати

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

Пребарај: #handmadeethiopia

当前筛选 #handmadeethiopia清除筛选

🎁 WHAT TO BRING FROM ETHIOPIA? SOUVENIRS THAT AMAZE! ከኢትዮጵያ ምን ማምጣት ይቻላል? አስደናቂ የመታሰቢያ ዕቃዎች! 🇪🇹 Forget boring magnets! Ethiopia = handmade paradise. ━━━━━━━━━━━━━━━━ ✨ TOP-7 SOUVENIRS EVERYONE WILL ASK ABOUT: ☕ 1. COFFEE CEREMONY SET Traditional jebena (ጀበና), cups, stand + beans from Sidamo, Yirgacheffe, Harar. Price: $15-30 🧴 2. NATURAL COSMETICS - ETHIOPIAN YOUTH MAGIC! 💎 EVERYONE SEARCHES FOR AGE SOLUTION - IT'S HERE, IN HUMANITY'S CRADLE! 🌟 Ethiopian Anti-Age Secret: • Coffee oil ☕ - powerful antioxidant, smooths wrinkles • Nug oil - rejuvenates skin, brings radiance • Black seed oil - Queen of Sheba's beauty secret! • Highland herbs 🏔️ - zero chemicals! 💥 RESULTS: ✅ Wrinkles reduce in 2-3 weeks ✅ Firm, glowing skin ✅ Natural rejuvenation ✅ 100% handmade, organic ተፈጥሮአዊ ውበት (natural beauty) Price: $5-25 | ዋጋ - AFFORDABLE! 🧺 3. MESOB BASKETS Colorful, unique! Used for injera serving. Interior design hit in Europe! ዋጋ: $20-50 💎 4. ETHIOPIAN OPALS Welo Opals - best in the world! Rainbow shimmer in handmade silver. ✨ Price: from $30 👗 5. TRADITIONAL TEXTILE Cotton with embroidery (ትቤብ - tibeb). Shawl, dress, or decor. ዋጋ: $25-60 🪵 6. WOODEN CRAFTS Carved figures from African wood. Incredible detail. Price: $10-40 🖼️ 7. ETHIOPIAN ART Religious icons, historical scenes on parchment. Millennia of history! ዋጋ: $30-200 ━━━━━━━━━━━━━━━━ 💼 BUSINESS OPPORTUNITIES FOR ETHIOPIAN YOUTH የንግድ እድሎች ለወጣት ኢትዮጵያውያን 🚀 Souvenir business = preserving culture + REAL MONEY! ━━━━━━━━━━━━━━━━ 🎯 TOP-6 DIRECTIONS: 1. ☕ PREMIUM COFFEE SETS • Packaging with region story • QR-code to production video • 3-language instructions 💰 High export potential 2. 💄 COSMETICS & PERFUMERY - GOLDEN MINE! 🌟 🧴 Anti-Age Cosmetics: • Coffee oil (антиоксидант №1) • Nug oil (የቆዳ ጤንነት superfood) • Black seed oil (የሳባ ንግሥት secret) 💰 Global organic beauty = $50 BILLION market! 🌸 ሽቶ ምርት (Perfumery): • Ethiopian frankincense (ዓጣን) - world's best! 🔥 • Natural scents, aromatherapy oils • Traditional incense (ጣር - t'ar) 💰 HUGE demand in Europe & Gulf! 💡 WHY IT WORKS: ✅ "Made in Ethiopia" = exotic + authentic ✅ 100% natural = premium prices (x3-5!) ✅ Anti-age trend = millions of buyers ✅ ዝቅተኛ ውድድር (Low competition) 3. 🎨 MODERNIZING TRADITIONS • Modern bags from traditional fabrics • Fusion jewelry (этно + contemporary) • Ethiopian-style interior decor 💰 Ethnic fashion = global trend! 4. 📦 SMART PACKAGING • Branded packaging with storytelling • የእጅ ሥራ (handmade) certificates • Artisan story inside 💰 Added value: +50-100% 5. 🌐 ONLINE PLATFORMS • Etsy, Amazon Handmade • Instagram shops • Direct social sales 💰 Millions of buyers access! 6. 🤝 COOPERATIVES & TRAINING • Workshops for youth • የሴቶች ማህበራት (Women cooperatives) • Fair Trade certification 💰 Social impact + profit! ━━━━━━━━━━━━━━━━ 🌟 ADVICE FOR ENTREPRENEURS: Quality > Quantity One premium item at $50 > ten cheap at $5. Tourists seek authenticity! Your story = your value Tell who you are, where craft comes from, hours of work = higher value! 🔥 ውበት = ትልቅ ንግድ (BEAUTY = BIG BUSINESS)! Ethiopian cosmetics & perfumery can be EXPORT HIT! Natural + ancient secrets + modern packaging = 💰💰💰 ━━━━━━━━━━━━━━━━ 🇪🇹 Ethiopia - not only history, but modern opportunities! 📱 Share your handmade projects - ተባበሩ (support together)! የእጅ ሥራ ፕሮጀክቶችዎን ያጋሩ! ━━━━━━━━━━━━━━━━ 🌍 ETHIOPIA | ЭФИОПИЯ | ኢትዮጵያ 📱 Join us: @ethiopia telegram #EthiopiaSouvenirs#HandmadeEthiopia#EthiopianCrafts#BusinessInEthiopia#EthiopianCoffee#EthiopianBeauty#NaturalCosmetics