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

Резултати

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

Пребарај: #urbanization

当前筛选 #urbanization清除筛选
Interesting Planet 🌍

@interesting_planet_facts · Post #699 · 06.09.2025 г., 16:22

🌎 Land reclamation has transformed Singapore’s size by about 25% since 1819, expanding the island using sand and soil from neighboring countries. The ongoing Tuas Megaport project will create new coastline with over 221 million cubic meters of fill material. ✨ #geography⚡#engineering⚡#urbanization 👉subscribe Interesting Planet ​

Interesting Planet 🌍

@interesting_planet_facts · Post #1397 · 12.05.2026 г., 22:11

🌎 Dubai’s Palm Jumeirah is an artificial archipelago built from over 120 million cubic meters of sand and rock. Constructed in the shape of a palm tree, it adds 56 kilometers of new coastline to the city. ✨ #engineering⚡#urbanization⚡#shoreline 👉subscribe Interesting Planet 👉more Channels ​

Amazing Geography 🌍

@amazingeo · Post #646 · 24.02.2026 г., 20:31

🌍 The average human today is more likely to live in a city than in the countryside—over 56% of the world’s population is now urban, a dramatic shift from just a few generations ago. ✨ #population⚡#urbanization⚡#cities⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography 👉more Channels ​

Amazing Geography 🌍

@amazingeo · Post #13 · 09.08.2025 г., 16:27

🌍 Over half of the world’s population now lives in cities, a dramatic shift from 1950 when only about 30% lived in urban areas. Urbanization is rapidly transforming our planet. ✨ #population⚡#urbanization⚡#cities⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography🌍

Amazing Geography 🌍

@amazingeo · Post #15 · 10.08.2025 г., 00:12

🌍 In 1800, fewer than 1 billion people lived on Earth. Today, the world population has soared past 8 billion, with more than half living in urban areas like cities and large towns. ✨ #population⚡#urbanization⚡#demographics⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography🌍

Amazing Geography 🌍

@amazingeo · Post #225 · 12.09.2025 г., 20:12

🌍 In 2022, Nigeria’s largest city, Lagos, became one of only two megacities in Africa to surpass 20 million residents, helping drive Africa’s rapid urban population growth. ✨ #population⚡#urbanization⚡#Africa⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography🌍 ​

Amazing Geography 🌍

@amazingeo · Post #137 · 29.08.2025 г., 09:12

🌍 Some cities, like Johannesburg, are built on high plateaus called "highveld," sitting over 1,700 meters above sea level. Their altitude shapes local climate and city life in unique ways. ✨ #urbanization⚡#elevation⚡#climate⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography🌍 ​

Amazing Geography 🌍

@amazingeo · Post #211 · 10.09.2025 г., 13:12

🌍 By 2050, city dwellers are expected to make up nearly 70% of the global population. Urban areas are now growing twice as fast as rural regions, reshaping how billions of people live. ✨ #urbanization⚡#cities⚡#demographics⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography🌍 ​

Irina Kalabikhina

@kalabikhina · Post #1139 · 26.01.2026 г., 12:11

🆕10(1)/2026 🔗Исторические и современные предикторы региональных культурных различий в индивидуализме и коллективизме в России Андрей А. Григорьев, Альбина А. Галлямова, Дмитрий С. Григорьев, Джон У. Берри В данном исследовании, основанном на экокультурном подходе, изучаются исторические и современные факторы, предсказывающие региональные культурные различия в соотношении индивидуализма (далее – ИНД) и коллективизма (далее – КОЛ, а для соотношения: ИНД/КОЛ) в России, с акцентом на частную собственность на землю в конце XIX – начале XX века и современную занятость в сельском хозяйстве. Анализ показывает, что регионы с более высокой распространенностью частной собственности на землю в 1877 г. и 1905 г. демонстрируют более выраженные тенденции ИНД в современных региональных границах, что свидетельствует о преемственности культурных черт. Кроме того, современные факторы, такие как доля рабочей силы в сельском хозяйстве и этнический состав, в частности доля этнических русских, оказываются значимыми предикторами различий ИНД/КОЛ. Однако урбанизация не обнаруживает значимой связи с региональными культурными различиями в ИНД/КОЛ, что указывает на то, что, хотя она может быть связана с ИНД, она не является основным предиктором. Результаты подчеркивают, что факторы, коренящиеся в традиционных типах хозяйства, вызывают глубокие и долгосрочные последствия для региональных культурных различий, сохраняясь даже в условиях масштабных общественных преобразований, произошедших в советское время. ▫️Публикация в журнале осуществляется бесплатно благодаря поддержке «АКБ «Держава» ПАО» и Экономического факультета МГУ имени М.В.Ломоносова. #population_and_economics#regional_culture#individualism_collectivism#urbanization

Amazing Geography 🌍

@amazingeo · Post #84 · 20.08.2025 г., 16:12

🌍 The largest internal migration in history occurred in China, with over 200 million people moving from rural villages to booming cities since the 1980s, transforming the nation’s economy and society. ✨ #migration⚡#China⚡#urbanization⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography🌍

Amazing Geography 🌍

@amazingeo · Post #83 · 20.08.2025 г., 13:12

🌍 Between 2010 and 2020, India saw more internal migrants than any other country, with tens of millions moving from villages to cities in search of work and better living conditions. ✨ #migration⚡#India⚡#urbanization⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography🌍

Amazing Geography 🌍

@amazingeo · Post #251 · 17.09.2025 г., 03:12

🌍 In 2021, Luxembourg became the first country to offer free nationwide public transport. This move reshapes economic geography by making travel easier and connecting people to jobs and services. ✨ #transport⚡#economy⚡#urbanization⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography🌍 ​

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