Python If-Else One Line and Match-Case (Visually Explained) | #Python Course 16
Data with Baraa
@datawithbaraaAbout
Hey, I'm Baraa, a Data Engineer with over 17 years experience, Ex-Mercedes Benz, where I led and built one of the biggest data platforms for analytics and AI. Now Iβm here to share it all through visually explained courses, real-world projects, and the skills that will get you hired. Iβve helped millions of students transform their careers. If that sounds interesting, consider subscribing! See you in the next video
Latest Posts
Video Description
Visually explained how to write if-else statements in one line and use the match-case structure in Python to simplify your conditional logic. π If you want more FREE content like this, then Subscribe, Like, and Comment β€οΈhttps://www.youtube.com/@UC8_RSKwbU1OmZWNEoLV1tQg βββββ *MY COURSES* To get certified, better clean structure & progress, support me: π SQL https://www.datawithbaraa.com/course/sql-full-course-for-beginners π Tableau https://www.datawithbaraa.com/course/tableau-ultimate-full-course-for-beginners π Udemy SQL: https://bit.ly/4hH947P π Udemy Tableau: https://bit.ly/3xFiDDk βββββ *CONNECT WITH ME* π¬ Newsletter https://www.blog.datawithbaraa.com/subscribe π¨βπ» LinkedIn https://www.linkedin.com/in/baraa-khatib-salkini/ πΈ Instagram https://www.instagram.com/datawithbaraa/ π₯ TikTok https://www.tiktok.com/@datawithbaraa π Website https://www.datawithbaraa.com/ π¬ Discord https://discord.gg/gsVJbMxKcA π§ Notion Roadmaps https://www.notion.com/@datawithbaraa β Favorite Books/Gear https://candle-gosling-511.notion.site/My-Favorite-Books-Gear-Apps-28334b251f1281e58a52cf7aa594e0e9?source=copy_link π© Sponsorships [email protected] βββββ *Get 25%* OFF DataCamp's Here https://www.datacamp.com/coupon/membership-2Fcheckout-3Fcoupon-DATAWITHBARAA25ALE25 βββββ *MY FREE COURSES* *SQL* https://youtu.be/SSKVgrwhzus *Python* https://www.youtube.com/playlist?list=PLNcg_FV9n7qZGfFl2ANI_zISzNp257Lwn *Tableau* https://youtu.be/UcGF09Awm4Y *Real World Data Projects* https://www.youtube.com/playlist?list=PLNcg_FV9n7qZ4Ym8ZriYT6WF8TaC2e_R7 *Data Career Roadmaps* https://www.youtube.com/playlist?list=PLNcg_FV9n7qah95jp-aPtysu7kFCbg7hd βββββ π *FREE DOWNLOADS & MATERIALS* https://www.datawithbaraa.com/wiki/python#welcome-to-python-course π *Table of Content* 00:00 - intro 01:16 - If Statement 05:56 - Python Indentation 10:25 - Else Statement 14:31 - Elif Statement 21:06 - Multi Elif 25:32 - Nested If 30:27 - Logical Operators 35:15 - Independent If 38:06 - #1 Python Challenge 50:43 - #2 Python Challenge This Python full course is built for Data Analysts, Data Engineers, Data Scientists, and Developers who want to learn Python step by step β from absolute basics to advanced, real-world applications. #python #learnpython #programming π *Table of Content* This course is perfect for data analysts, data engineers, data scientists, software developers, and studentsβcovering everything from the basics to advanced python topics. #python #learnpython #pythonforbeginners #datawithbaraa #programming #pythoncourse #datascience #dataanalysis #technology #coding #ai #webdevelopment *Please note I may earn a small commission for any purchase through these links, which means at no additional cost to you - Thanks for supporting the channel!* *All opinions or statements in this video are my own and do not reflect the opinion of the company I work for or have ever worked for*
Upgrade Your Everyday
AI-recommended products based on this video

Amazon Echo Show 8 (newest model), With Spatial Audio, Smart Home Hub, and Alexa, Charcoal

Apple AirPods 4 Wireless Earbuds, Bluetooth Headphones, with Active Noise Cancellation, Adaptive Audio, Transparency Mode, Personalized Spatial Audio, USB-C Charging Case, Wireless Charging, H2 Chip

Wireless Earbuds, Bluetooth 5.4 Headphones, True Wireless Stereo Earphones with IPX7 Waterproof, Noise Cancelling Mic, Fast Charging and Comfort Fit Ear Buds for Sports/Workouts - Black

Apple AirPods 4 Wireless Earbuds, Bluetooth Headphones, Personalized Spatial Audio, Sweat and Water Resistant, USB-C Charging Case, H2 Chip, Up to 30 Hours of Battery Life, Effortless Setup for iPhone

Apple AirPods Pro 2 Wireless Earbuds, Active Noise Cancellation, Hearing Aid Feature, Bluetooth Headphones, Transparency, Personalized Spatial Audio, High-Fidelity Sound, H2 Chip, USB-C Charging

Smart Watch for Men/Women, 1.95" AMOLED Fitness Tracker Watches with Bluetooth Calls/Flashlight/100+ Sport Modes Heart Rate/Sleep Monitor Ultra Lightweight Ultrathin Design

Smart Watch for Men Women (Answer/Make Call), 1.96" HD Smartwatch Fitness Activity Tracker, 110+ Sports IP68 Waterproof, Heart Rate/Sleep Monitor/Pedometer/Calories, Fitness Watch for Android iOS
![Apple Watch Series 10 [GPS 46mm case] Smartwatch with Rose Gold Aluminium Case with Light Blush Sport Band - M/L. Fitness Tracker, ECG App, Always-On Retina Display, Water Resistant](https://m.media-amazon.com/images/I/61nNNMI1cFL._AC_UL960_FMwebp_QL65_.jpg)
Apple Watch Series 10 [GPS 46mm case] Smartwatch with Rose Gold Aluminium Case with Light Blush Sport Band - M/L. Fitness Tracker, ECG App, Always-On Retina Display, Water Resistant
![Apple Watch Series 10 [GPS 42mm case] Smartwatch with Jet Black Aluminium Case with Black Sport Band - S/M. Fitness Tracker, ECG App, Always-On Retina Display, Water Resistant](https://m.media-amazon.com/images/I/6105jZyXyPL._AC_UL960_FMwebp_QL65_.jpg)
Apple Watch Series 10 [GPS 42mm case] Smartwatch with Jet Black Aluminium Case with Black Sport Band - S/M. Fitness Tracker, ECG App, Always-On Retina Display, Water Resistant

NOCO Boost GB40: 1000A UltraSafe Jump Starter β 12V Lithium Battery Booster Pack, Portable Jump Box, Power Bank & Jumper Cables - for 6.0L Gas and 3.0L Diesel Engines

UGREEN Nexode Power Bank 20000mAh 130W Portable Charger 72Wh PD Fast Charging 3-Port USB C Battery Pack with TFT Smart Display for MacBook/iPad/iPhone 16/Samsung S24 and More

ANKER 737 Power Bank, 24,000mAh 3-Port Laptop Portable Charger with 140W Fast Charging, Smart Display, for Outdoor Work, Compatible with iPhone 16/15/14 Series, Vision Pro, Samsung, MacBook, and More

VOLTME Portable Charger, Slim 10000mAh 5V/3A Power Bank, USB C in&Out High-Speed Charging Battery Pack, Travel Essentials Dual Output Compatible with iPhone 16 15 14 13 12 Samsung Google iPad etc

Apple AirPods 4 Wireless Earbuds, Bluetooth Headphones, with Active Noise Cancellation, Adaptive Audio, Transparency Mode, Personalized Spatial Audio, USB-C Charging Case, Wireless Charging, H2 Chip

Apple AirPods 4 Wireless Earbuds, Bluetooth Headphones, Personalized Spatial Audio, Sweat and Water Resistant, USB-C Charging Case, H2 Chip, Up to 30 Hours of Battery Life, Effortless Setup for iPhone

Apple AirPods Pro 2 Wireless Earbuds, Active Noise Cancellation, Hearing Aid Feature, Bluetooth Headphones, Transparency, Personalized Spatial Audio, High-Fidelity Sound, H2 Chip, USB-C Charging

Bose QuietComfort Bluetooth Headphones, Wireless Headphones with Active Over Ear Noise Cancelling and Mic, Deep Bass, Up to 24 Hours of Playtime, White Smoke

Barnyard Designs Indoor Herb Garden Planter Set with Tray, Metal Windowsill Plant Pots with Drainage for Outdoor or Indoor Plants, Set/3 (Black)

Eye Contact Web Camera for Desktop Computer β 1080P USB Camera with Microphone & Stand, Center Cam for Laptop or Desktop, Manual Focus, Plug & Play for macOS & WindowsοΌBlackοΌ
![PEHAEL 3+3Pack for iPhone 17 Pro Max Privacy Screen Protector with Camera Lens Protector Full Coverage Anti-Spy Tempered Glass Film 9H Hardness Easy Installation Bubble Free [6.9 inch]](https://m.media-amazon.com/images/I/61PnVkv6KKL._AC_UL960_FMwebp_QL65_.jpg)
PEHAEL 3+3Pack for iPhone 17 Pro Max Privacy Screen Protector with Camera Lens Protector Full Coverage Anti-Spy Tempered Glass Film 9H Hardness Easy Installation Bubble Free [6.9 inch]
![Ailun 3 Pack Screen Protector for iPhone 16 Pro Max [6.9 inch] + 3 Pack Camera Lens Protector with Installation Frame,Sensor Protection,Dynamic Island Compatible,Case Friendly Tempered Glass Film](https://m.media-amazon.com/images/I/815keamN-BL._AC_UL960_FMwebp_QL65_.jpg)
Ailun 3 Pack Screen Protector for iPhone 16 Pro Max [6.9 inch] + 3 Pack Camera Lens Protector with Installation Frame,Sensor Protection,Dynamic Island Compatible,Case Friendly Tempered Glass Film































