MASTER the Match Statement in Python | Python 3.10 Switch Case Complete Guide

Sdílet
Vložit
  • čas přidán 22. 11. 2022
  • 💻 Get my Source Codes and support the channel ❤️:
    www.buymeacoffee.com/fabiomus...
    ⬇️ LEARN ON THE BEST LEARNING PLATFORMS (LINKS BELOW) 😉💪 ⬇️
    ☕ Buy me a coffee: www.buymeacoffee.com/fabiomus...
    😍 One-off donation: www.paypal.me/FabioMusanni/
    SKILLSHARE
    (Python, Web Dev, UI/UX Design, Music, Art, Animation and a lot more)
    🔗 skillshare.eqcm.net/5gxzD2 (Affiliate)
    DATACAMP
    (Python, ChatGPT, SQL, Power BI, and a lot more)
    🔗 datacamp.pxf.io/vN1bDj (Affiliate)
    COURSERA PYTHON
    (For beginners, Data Science, Data Analysis, AI, Cybersecurity and a lot more):
    🔗 imp.i384100.net/k0Nk60 (Affiliate)
    COURSERA WEB DEVELOPMENT
    (Full Stack, Front-End, Back-End, Web Design and a lot more):
    🔗 imp.i384100.net/EKWxBW (Affiliate)
    Learn how to use the new match case to really master pattern matching in Python.
    If the video was helpful, let me know in the comments down below and also like the video so that other people can see it. Needles to say I really appreciate your support 💪❤️
    📨 SUBSCRIBE so that you don't miss any new video:
    czcams.com/users/FabioMusann...
    🤗 BIO PAGE (contacts, etc): solo.to/fabiomusanni
    Create Your Bio Page (10% OFF Upgraded Plans 😉): solo.to/inv/NDE4NzE2
    🔗 RELATED CONTENT (videos, playlists, etc) 🔗
    Python Playlist: • 🐍 Learn Python With Fa...
    🤩 AFFILIATE LINKS 🤩
    Create Your Bio Page (10% OFF Upgraded Plans): solo.to/inv/NDE4NzE2
    🧑🏻‍💻 ABOUT ME 🧑🏻‍💻
    I'm Fabio, I started programming with Python a lot of years ago and I fell in love with this world.
    I started this CZcams channel to help you during your own journey and I hope that my help can make you an amazing programmer who loves this world as I do.
    Welcome on board!! 🚀
    #pythonWithFabioMusanni #pythonforbeginners #python #pythontutorial #pythonprogramming #coding #programming
  • Věda a technologie

Komentáře • 29

  • @FabioMusanni
    @FabioMusanni  Před rokem +3

    ⬇️ *LEARN ON THE BEST LEARNING PLATFORMS (LINKS BELOW)* 😉💪 ⬇️
    ☕ *Buy me a coffee:* www.buymeacoffee.com/fabiomusanni
    ❤️ *Support me monthly:* www.patreon.com/FabioMusanni
    😍 *One-off donation:* www.paypal.me/FabioMusanni/
    *SKILLSHARE*
    _(Python, Web Dev, UI/UX Design, Music, Art, Animation and a lot more)_
    🔗 skillshare.eqcm.net/5gxzD2 (Affiliate)
    *DATACAMP*
    _(Python, ChatGPT, SQL, Power BI, and a lot more)_
    🔗 datacamp.pxf.io/vN1bDj (Affiliate)
    *COURSERA PYTHON*
    _(For beginners, Data Science, Data Analysis, AI, Cybersecurity and a lot more):_
    🔗 imp.i384100.net/k0Nk60 (Affiliate)
    *COURSERA WEB DEVELOPMENT*
    _(Full Stack, Front-End, Back-End, Web Design and a lot more):_
    🔗 imp.i384100.net/EKWxBW (Affiliate)
    Thank you for the support!❤
    🎥All my videos about Python: czcams.com/play/PLs8qUrmRvaR0IT4IwJl-LSweAdACW-yLK.html

  • @lvplvp
    @lvplvp Před rokem +2

    22:17 I never comment when CZcamsrs spam the 'comment, like, share' annoying requests. However, This is the first time I do and I'm on this platform since 2007 lol. Your videos deserve recognition. They are well made and helpful. It's clear you put a lot of time and heart into this. Thank you so much!!!

    • @FabioMusanni
      @FabioMusanni  Před rokem +3

      This is one of the best comments 😍😍❤ If you don't mind, I pinned it.
      What can I say? I'm speechless 🙊I'm honored you broke your rule to comment on this video and I'm also glad you like my videos, I definitely put a lot of effort into making them and I love that there are still people like you who appreciate and acknowledge that.
      Thank you again! ❤🤗

    • @Eternal_pimp
      @Eternal_pimp Před 11 měsíci +2

      ​@@FabioMusanni Credits where Credits is due. You could have wrapped it up in 10 minutes and called it a day, but the extra attention to detail and the edge cases, makes it significantly better to understand and grasp. Your effort is clearly visible and wholeheartedly appreciated. Thank you and hope you keep making stuff like this.

    • @FabioMusanni
      @FabioMusanni  Před 11 měsíci

      @@Eternal_pimp Thank you so so much😍😍🤗
      You are right, I spent a lot of time and effort to create this video and my goal was to make it the best on the subject and I'm glad there are people like you who appreciate it and don't take this for granted.
      I'm trying my best to keep posting videos like this, although recently I haven't been able to, but I'm back on track now and I've just opened a Patreon account for people who want to support me for what I do, if you want to check that out, here's the link : www.patreon.com/FabioMusanni .
      Thank you so much again for the nice words 🙏🏻 and I hope you stick around to watch other content ☺😉

  • @mindypweightloss
    @mindypweightloss Před rokem +1

    Thanks for the thorough explanation. This was awesome!

    • @FabioMusanni
      @FabioMusanni  Před rokem +1

      Hey Mindy! Thank you very much for the comment 😊😍 Really appreciated!

  • @vasigaran_vip_theboss8951

    Really helpful. Great! match case is very helpful when matching messed values. wow.

    • @FabioMusanni
      @FabioMusanni  Před rokem

      First of all thank you for the comment! 🥰
      Yes, the match statement is incredibly useful and powerful, that's why I created this guide that goes through all the various combinations and uses, so I'm glad it was helpful 🙏🏻 😍

  • @azizbekrakhimov1885
    @azizbekrakhimov1885 Před 3 měsíci

    Really useful video👍

    • @FabioMusanni
      @FabioMusanni  Před 3 měsíci

      Thank you for the comment! Happy to hear the video was helpful! 💪😍

  • @llhama6016
    @llhama6016 Před rokem +1

    thank you so much your video was very helpfull and easy to understand

    • @FabioMusanni
      @FabioMusanni  Před rokem +2

      Hey!! 😍 Thank you for taking the time to comment! These kind of comments are the fuel that keeps me going, so thank you again! I'm glad it was easy to understand 💪 😊

    • @llhama6016
      @llhama6016 Před rokem +1

      @@FabioMusanni your welcome

  • @Netpilation
    @Netpilation Před rokem +1

    you know i love your videos sir

    • @FabioMusanni
      @FabioMusanni  Před rokem +1

      Thank you for the comment and the support! 😍💪

  • @hamza77v
    @hamza77v Před rokem +2

    keep uploading!!!

    • @FabioMusanni
      @FabioMusanni  Před 11 měsíci

      Thank you! 😊😊
      Unfortunately lately I haven't been able to post as much, but I'll try my best, in the meanwhile I have already a lot of other cool videos for you to watch! 💪😉

  • @Vaishnavi-lb6yn
    @Vaishnavi-lb6yn Před 5 měsíci +1

    Thank you sir for wonderful class

    • @FabioMusanni
      @FabioMusanni  Před 5 měsíci

      Thank you for the comment! 💪 Glad you liked it! 😍

  • @VickyChaturvedi180
    @VickyChaturvedi180 Před 10 měsíci +1

    🎉

  • @user-bw8ej4yx4e
    @user-bw8ej4yx4e Před rokem +1

    you should explain the point in the beginning its hard to follow like why are you setting up two variables what is the match case purpose idk

    • @FabioMusanni
      @FabioMusanni  Před rokem +4

      The match statement is just a tool, it's just a different and more powerful way of writing an if-elif-else statement as I said in the beginning. I can't tell you when to use it because you can always use it or never, as I say in the video you can use the match statement or the if-elif-else statement interchangeably, it just depends on what you like to do. Once you know what the match statement does and how it works, you can decide whether to use it or not in your own projects, it's not necessary but can make your life easier in certain situations. In this video (czcams.com/video/hnmqxC6fxQA/video.html) for example I used it to make command line commands.
      The two variables are used in the examples, they are necessary to show you how to use the match statement, in fact, as you can see a few seconds later, one is used as the expression of the match statement and the other one is used in the guard.

  • @programming5274
    @programming5274 Před 11 měsíci

    I want to match a list with two persons who have the same name, but this code isn't working:
    case [Person(name as n), Person(name = n)]:
    Is this not possible?

    • @FabioMusanni
      @FabioMusanni  Před 11 měsíci

      Hello 😊
      Let's say you want to match a list where you have two Person objects with the same name "John", you'd do something like this:
      case [Person(name="John"), Person(name="John")]:

  • @benhari27
    @benhari27 Před 8 měsíci

    I have a Python script and there is an error in it. Can you help me correct the error?❤❤ plz

    • @FabioMusanni
      @FabioMusanni  Před 8 měsíci +1

      Hello 😊🤗
      I actually offer support via email to members of the tier "Super Fan + Support from me!" of my Patreon ( www.patreon.com/FabioMusanni )

  • @SolathPrime
    @SolathPrime Před 2 měsíci

    match statements makes no sense until you need to parse a python ast lol

    • @FabioMusanni
      @FabioMusanni  Před měsícem

      True, they are actually pretty useful anyway because they make things cleaner instead of using if/elif/else.