Exceptions in Python || Python Tutorial || Learn Python Programming

///Exceptions in Python || Python Tutorial || Learn Python Programming

Exceptions in Python || Python Tutorial || Learn Python Programming

FavoriteLoadingAdd to favorites

Exceptions allow you to write code which may not work, and then handle the successful and failed cases separately. The four clauses in Python Exception handling are try, except, else, and finally. These give you the ability to handle an error (except), a success (else), or either (finally). Today we introduce the most common types of exceptions in Python, and then show you how to use all 4 exception clauses.

➢➢➢➢➢➢➢➢➢➢
We would like to thank our Patrons “Birds Eat Bees”, Juan Guillermo Henao, Andrew Mengede, Martin Stephens, Carlos Araujo, and Tracy Karin Prell. Their generous support on Patreon helped make this video possible.

➢➢➢➢➢➢➢➢➢➢
To learn Python, you can watch our playlist from the beginning:

➢➢➢➢➢➢➢➢➢➢
To​ ​help​ ​us​ continue making videos,​ ​you​ ​can​ ​support​ Socratica at:

​Patreon​:

Socratica Paypal:

We also accept Bitcoin! 🙂
Our​ ​address​ ​is: 1EttYyGwJmpy9bLY2UcmEqMJuBfaZ1HdG9

Thank​ ​you!!

➢➢➢➢➢➢➢➢➢➢
If you’d like a reference book, we recommend “Python Cookbook, 3rd Edition” from O’Reilly:

The Mythical Man Month – Essays on Software Engineering & Project Management

➢➢➢➢➢➢➢➢➢➢
You​ ​can​ ​also​ ​follow​ ​Socratica​ ​on:
-​ ​Twitter:​ ​@socratica
-​ ​Instagram:​ ​@SocraticaStudios
-​ ​Facebook:​ ​@SocraticaStudios

➢➢➢➢➢➢➢➢➢➢
Python instructor: Ulka Simone Mohanty (@ulkam on Twitter)
Written & Produced by Michael Harrison (@mlh496 on Twitter)

➢➢➢➢➢➢➢➢➢➢
Yoda, Star Wars The Exhibition, Madrid

Author: Daniel Huntley

source

By |2019-10-12T23:20:02+00:00October 12th, 2019|Python Video Tutorials|25 Comments

25 Comments

  1. Socratica October 12, 2019 at 11:20 pm - Reply

    We're halfway there. We still need your help! Support Socratica Python Kickstarter: http://bit.ly/PythonKickstarter

  2. Michael Murphy October 12, 2019 at 11:20 pm - Reply

    The xfiles couldn't be found? IT'S A COVER UP!

  3. Socratica October 12, 2019 at 11:20 pm - Reply

    Support what you love! Socratica has a Kickstarter to make more Python: http://bit.ly/PythonKickstarter

  4. Paper Benni October 12, 2019 at 11:20 pm - Reply

    Exceptional quality content!!

  5. 3m0_Wr3ck October 12, 2019 at 11:20 pm - Reply

    @3:03 HAHAHA

  6. Street Now October 12, 2019 at 11:20 pm - Reply

    Please can you do video on Python Django

  7. sunray October 12, 2019 at 11:20 pm - Reply

    super presentation

  8. Ivan Kazakov October 12, 2019 at 11:20 pm - Reply

    Aside from the fact that else clause is unreachable, great video

  9. Anthony Liu October 12, 2019 at 11:20 pm - Reply

    1:18 I am going to deliberately make mistakes in my code. The mere thought of this causes my neural nets rebel, but this is for a good cause. LOL.

  10. helo void October 12, 2019 at 11:20 pm - Reply

    byteNotFound exception

  11. DarthChrisB October 12, 2019 at 11:20 pm - Reply

    I'm so poor I can't even pay attention.

  12. Eugene Miller October 12, 2019 at 11:20 pm - Reply

    Ahhh it burns nooo … once you run return it doesn't execute anymore in that def. returning the data at that phase doesn't call f.close() you've got an open file pointer … oh it burns nooooo.

    Edit:I guess after all these years I don't know python.

    def myTest():
    try:
    print ("hi")
    return "I'm not returned."
    except Exception as e:
    print("{}".format(e))
    else:
    return "The else isn't returned either."
    finally:
    print("I shouldn't print because we returned already, but I do.")
    return "This is so weird … I'm returned."
    return "If I'm returned the world makes no sense."

    print(myTest())
    ### Output
    hi
    I shouldn't print because we returned already, but I do.
    This is so weird … I'm returned.

  13. Mark Indiveri October 12, 2019 at 11:20 pm - Reply

    I think I just found my favorite Python tutor. Also, I think I'm in love.

  14. David Saint October 12, 2019 at 11:20 pm - Reply

    If you fail to plan for failure, you're a failure planning to fail.

  15. Gokul S N October 12, 2019 at 11:20 pm - Reply

    Even i have girlFriendNotFoundError

  16. Akshay Gupta October 12, 2019 at 11:20 pm - Reply

    i think i got a worng version of python

  17. amal rosh October 12, 2019 at 11:20 pm - Reply

    Why is the women wearing the same dress in every episode

  18. Aniket Tiratkar October 12, 2019 at 11:20 pm - Reply

    That's a brilliant way to demonstrate concepts.
    That's the reason why this is the only youtube channel on which I like every video I watch. And, probably, in future, when I start earning, I will stop raising MoneyNotFoundError. 🙂

  19. Guilherme Matos Passarini October 12, 2019 at 11:20 pm - Reply

    Wow! Incredible

  20. Manuel Engel October 12, 2019 at 11:20 pm - Reply

    I love how you can be dead serious and still funny at the same time.

  21. roystan gomes October 12, 2019 at 11:20 pm - Reply

    mathematical SIN !! this is intense

  22. Xtra Miles October 12, 2019 at 11:20 pm - Reply

    Wow! Love Socratica, Love you Ulka!

  23. Lovemore Nanjaya October 12, 2019 at 11:20 pm - Reply

    Wow, that introduction!

  24. Harshit Pandey October 12, 2019 at 11:20 pm - Reply

    Not subscribing to this channel is a sin.

  25. canvasMC October 12, 2019 at 11:20 pm - Reply

    I wonder if there are any out-takes of the actor laughing whilst recording these…..

Leave A Comment

*