@MyGovCoronaNewsdesk · Post #13350 · 23.02.2025 г., 05:34
119th Episode of Mann Ki Baat Watch Live: https://www.youtube.com/watch?v=Xzi-vKiibyI #MannKiBaat
Hashtags
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
Пребарај: #mannkibaat
@MyGovCoronaNewsdesk · Post #13350 · 23.02.2025 г., 05:34
119th Episode of Mann Ki Baat Watch Live: https://www.youtube.com/watch?v=Xzi-vKiibyI #MannKiBaat
Hashtags
@MyGovCoronaNewsdesk · Post #13326 · 19.01.2025 г., 10:22
#MannKiBaat
Hashtags
@MyGovCoronaNewsdesk · Post #13325 · 19.01.2025 г., 10:22
#MannKiBaat
Hashtags
@MyGovCoronaNewsdesk · Post #13324 · 19.01.2025 г., 10:22
#MannKiBaat
Hashtags
@MyGovCoronaNewsdesk · Post #13323 · 19.01.2025 г., 10:22
#MannKiBaat
Hashtags
@MyGovCoronaNewsdesk · Post #13322 · 19.01.2025 г., 04:51
Stay tuned for the 118th episode of #MannKiBaat, today at 11 AM. 🔗https://www.youtube.com/live/Di-GyUIU72U?si=4lDtrHgq-N_XnOoM
Hashtags
@MyGovCoronaNewsdesk · Post #13301 · 16.12.2024 г., 06:33
Have an inspiring story to share with India? Send it to PM Narendra Modi and stand a chance to be featured on #MannKiBaat. Your story could ignite positivity across the nation. Visit: https://www.mygov.in/group-issue/inviting-ideas-mann-ki-baat-prime-minister-narendra-modi-29th-december-2024/
Hashtags
@MyGovCoronaNewsdesk · Post #13219 · 28.07.2024 г., 04:53
Tune in to 112th Episode of #MannKiBaat by PM Narendra Modi at 11 AM onwards! 🔗https://www.youtube.com/live/0NNhOh2XLg4?si=H9LRqQxSAFmIW6ld
Hashtags
@MyGovCoronaNewsdesk · Post #13209 · 12.07.2024 г., 08:59
In the latest episode of #MannKiBaat, PM Narendra Modi shared the inspiring story of Karthumbhi Umbrella from Kerala. Crafted by women entrepreneurs, these umbrellas are part of a larger initiative including a bamboo handicraft unit. This effort highlights the 'Vocal for Local' initiative and supports the tribal community of Attappady. Full Story: https://youtube.com/watch?v=CGWUrN8fcdQ Do you have any similar inspiring stories? Submit them for this month's episode! Visit: https://mygov.in/group-issue/inviting-ideas-mann-ki-baat-prime-minister-narendra-modi-28th-july-2024/
Hashtags
@MyGovCoronaNewsdesk · Post #13074 · 28.01.2024 г., 05:14
Tune in to the 109th episode of #MannKiBaat with PM Narendra Modi today at 11 AM. WATCH LIVE: https://www.youtube.com/watch?v=6NWEhOANvjE
Hashtags
@MyGovCoronaNewsdesk · Post #12780 · 28.05.2023 г., 12:43
#MannKiBaat
Hashtags
@MyGovCoronaNewsdesk · Post #12778 · 28.05.2023 г., 10:42
#MannKiBaat
Hashtags