Exceptions in Python || Python Tutorial || Learn Python Programming
ฝัง
- เผยแพร่เมื่อ 4 ส.ค. 2024
- 𝙎𝙩𝙖𝙮 𝙞𝙣 𝙩𝙝𝙚 𝙡𝙤𝙤𝙥 𝙄𝙉𝙁𝙄𝙉𝙄𝙏𝙀𝙇𝙔: snu.socratica.com/python 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.
To learn Python, start our Python Playlist HERE:
bit.ly/PythonHelloWorld
Subscribe to Socratica: bit.ly/1ixuu9W
♦♦♦♦♦♦♦♦♦♦
We recommend:
Python Cookbook, Third edition from O’Reilly
amzn.to/2sCNYlZ
The Mythical Man Month - Essays on Software Engineering & Project Management
amzn.to/2tYdNeP
Shop Amazon Used Textbooks - Save up to 90%
amzn.to/2pllk4B
♦♦♦♦♦♦♦♦♦♦
Ways to support our channel:
► Join our Patreon : / socratica
► Make a one-time PayPal donation: www.paypal.me/socratica
► We also accept Bitcoin @ 1EttYyGwJmpy9bLY2UcmEqMJuBfaZ1HdG9
Thank you!
♦♦♦♦♦♦♦♦♦♦
Connect with us!
Facebook: / socraticastudios
Instagram: / socraticastudios
Twitter: / socratica
♦♦♦♦♦♦♦♦♦♦
Python instructor: Ulka Simone Mohanty (@ulkam on Twitter)
Written & Produced by Michael Harrison (@mlh496 on Twitter)
♦♦♦♦♦♦♦♦♦♦
Yoda, Star Wars The Exhibition, Madrid
commons.wikimedia.org/wiki/Fi...
Author: Daniel Huntley
♦♦♦♦♦♦♦♦♦♦
Wear a Socratica Python shirt for good luck coding: shop.socratica.com/products/python-by-socratica
I swear I can't with these videos anymore.. Looooool '... where this mathematical sin was committed.' I absolutely love your videos, I'm glad to be a software engineer. These videos remind me of what programming should always be like, fun, mind boggling interesting and exciting.
Ijeoma Oguegbu 😂😂😂😂
It's official! The Socratica Python Kickstarter was a success! Thank you to all of our supporters. Because of you, many more Python videos coming soon!! 💜🦉
Applied Machine Learning in Python is coming?
Yes please
You go straight to the point , I love it , you don't have to say much, your concepts are clear and understandable, It took me one video to subscribe, Continue making these videos they are worth every second,🔥🔥🔥
"I am not amused. The answer is i." 👌
My goodness!. ..."for such a mathematical sin" i admire you a lot.
Omg I thought this series was dead :O I'm very happy to see a new episode!
Same here! Thanks! :)
0:30 "letting them know what they could do with their division request" lmaoo
This series is hands down the best content to learn python on youtube I've ever seen. I've been struggling a lot since I started to learn coding in python and I keep finding myself going through the episodes to check out its contents. 10/10 not pushing
MoneyNotFound Error :-))
haha
Then install Python and start (L)earning :)
😂😂nice bro😂😂
When you try to program without a job. 😂
I've been a developer focusing on Python for over 5 years & still watch every one of your videos. How I wish that this had been available when I was learning. Also because of your series, I started writing docstrings again! :-p
How much money do u make as a python developer
@@mabd7340 almost nobody just makes a living being a Python dev. You need to have several other languages like JS , react , C++ to get a real job
Good luck
@@OneManCanStopTheMotorOfWorld Get into Data Science or Data Engineering with python and you'll have a really good salary.
These videos are so awesome on so many levels.
I don't understand why people dislike this video! THIS IS AWESOME! This is the only youtube channel I know that teaches python in this kind of way, the FUN way
As a CS student, I think this channel is underestimated!! OMG. This channel is amazing!!!!
Try:
watch_video()
Except DistractionError:
return("Became distracted by the attractive charismatic python tutor")
This is one of the best python tutorials on the internet. We need more of these please
This video is so fun, and the effort you put into these videos is SO appreciated. You earned a subscriber with this one, thank you for your exceptional work Sorocratica!!
These are by far the best programming video productions I have ever seen
I'm so happy to see more of this. Please keep it up, and when you run out of things with python, do another language. Thanks for this upload!!
Great tutorials, definitely recommended ! Ulka's (the Presenter) explanations are really clear, besides she is funny and ... beautiful ! ; ) Subscribed !
It is one of the best teaching videos i have ever seen. The way the young lady explains without unnecessary fussing around is simply awesome. Just enjoy the videos. Please also make vidoes on other topics as well. The clarity and smooth delivery is unrivaled in the Teaching Video catagory
These videos are amazing. The content is very clearly presented. I just love the automaton-like delivery. She is awesome.
This video series is absolutely fantastic and I enjoy watching episodes despite knowing most of their raw content already :)
I thought you had forgotten about us - Good to see another great video from Socratica
Seeing this series back just made my Friday night!
The best explanation about exceptions that I've ever seen. Very clearly and precisely.
This is the best channel to learn Python!
These videos are lovely. This will definitely help with my training. I’m grateful for these videos.
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. :)
Might be a good idea to talk about context managers, a much much cleaner way to handle exceptions, entry points, exit points, and cleanup (such as closing a resource, whether it's a socket, file, or anything else)
YAY - glad you are back - GREAT timing :)
Now ... this is truly the best educational video I've ever seen on programming. Teasing and massively packed with knowledge, visually appealing and perfectly fitting music as cream on top. Hey, why isn't this on TV? Back in the 90s (Switzerland / Austria / maybe also Germany) we HAD this -- just way worse of course ;). CHEERS!
Socratica ROCKS - excellent tutorials and dead-pan intelligent humour - More power to this channel!!
Wow, what a great series! I'm definetly going to recommend this to my friend :) I hope new python tutorials are coming sometime soon (i see that this video didn't get much notice... but i enjoyed it a lot)
guys where have you been ... I thought the series was over .... keep up the good work
I wish there were more of these videos in this series - they are so useful and also hilarious
the content, the explanations, and last but not least the humor. Please more of this :-)
The "apparantly yoda never wrote code" line killed me xD
Your explanation is just brilliant Socratica. Keep up the good work you nerds.
Good to see you back again @Socratica
I will continue to support you on TH-cam. You guys are awesome
Who the hell dislikes such an entertaining and informative video. Anyways thanks a lot i am a new subscriber whose been enjoying watching your tutorials. Must say been very entertaining whilst educating for me, also in areas which I thought I already new. Thank you very much. :)
Awesome! I've missed this so much!
Great tutorials really; Thank you for sharing your knowledge
Brilliantly presented. Love the humour as well. Thank you so much.
Wow! Love Socratica, Love you Ulka!
Welcome back!! Thank you!!!
After sooooo long...Really feel alive now to see another episode of python:D @socratica
Oh my goodness THIS IS EXCEPTIONAL! At the end of a long day of grinding I didn't think I could handle yet another Python video but, no, this is much more fun than watching Netflix. I absolutely love it.
Good luck in your exams! We're rooting for you!! 💜🦉
this must be one of my favorite youtube channels
Hey, I've watched a few of your videos and they're brilliant! Please keep it up so I can show them to my kids when they're learning python 8 or something haha
I love these videos. Very helpful and entertaining!!
Great to see you are back!!!
am so blessed this is the first video I am learning about exceptions on, so awesome
Super video comme toujours. Avec des jolies jeux de mots à chaque fois. Great video madam :)
Love your terse explanations - gets to the point, short & sweet ( with a nice dash of dry humor). Hope your Python tuts will go on!
"Correction!" these are juicy-humours, 4real!!
This is so good. SO GOOD
This is a furiously underrated channel
I am speechless after watching your videos. Loved them.
Wow , very excellent and captivating video on exceptions - really like the way you explained - wonderful job!
Welcome to Socratica! You can see our entire Python Playlist here: bit.ly/PythonSocratica
Subscribe to see all our new videos! bit.ly/SocraticaSubscribe
Can you also help me with OOPS concept in python
Best python exception lesson I've watched so far on TH-cam!!!
Well Explained, Really Funny Jokes...Thanks A Lot!
I subscribed your channel right after I came across it on TH-cam. Your vides explain ideas concisely and clearly which outstanding among others. Thank you very much for creating those awesome videos!
BTW, I have read some sad news regarding Coronavirus in Italy. I hope you all are fine and get through this tough time soon!
I think I just found my favorite Python tutor. Also, I think I'm in love.
This is super high quality stuff! Thanks a lot
Anytime, Any time, please forgive my direct thing, but this is NOT a "Python", this is an ANACONDA.
Excellent script, performance, delivery, you name it, the works. At the top of all Python videos.
glad you're back!
oh man, I was watching another video on this topic and it almost put me to sleep, how you describe things and your artistic flair makes it really enjoyable and understandable. Thank you so much.
Thanks for your kind words! We have so much fun making these videos! 💜🦉
Love this python series. I hope it keeps going!
Oh, it will keep going, Tony! :) It will...
Your method of teaching is very enthusiastic... it stimulates the passion to learn triggering everything...eish l can't explain you are too good
Great content, graphics, concentrated ideas, and no smile robot mode is fabulous
Oh my god!
They're back.
Found you today, and fell fo you today, you are AMAZING!
ok, I had to pause the video, subscribe before continuing with the video. awesome
I love your banter. Really useful videos too.
Wonderful video!! programmers are trying all over the place! - Awesome!!
Whoaaa I missed these tutorials!
Great Video ... great video Socratica is a fantastic idea.
U rock all the time... thanks for the video waiting for few more...
Beautiful, thank you. Let’s learn, I need that!
Socratica I just love you and your method of presentation on python.
You are an amazing tutor with very good humor.
Incredible series! I would like q similar series for the basics of vim
Amazing concept... but I'm a beginner so I was little lost with the example... but I got very well the general concepts... reallly keep going!!
Really high quality. Well done
Best Python tut I ever seen...
Excellent presentation. Great job.
Wow your videos are really the best. TY keep them coming.
Very time when I write a faction I remember Socratica and write a doc string after a lol!! :-))
Thank you Socratica! :)
When I was about to give up for python .. I got you 😌.
Thanku ✨
Nice videos ! Allow me to comment this one and mention that if you "return data" (or continue or break) in the try block, python leave the function and never execute the "else" block. But the finally block is always executed. So in your example, the open file is never closed.
Great content. I am so happy it is offered pro bono.
...'you are trying, all over the place" Classic!
These videos are the best!
As always, hilarious and informative 😂
Hi! First time viewer of your content! Love it. I love the sound of your voice. I'd love you to my virtual assistance
I love the comedy in the tutorials. Thank you very much.
Love these videos so cool hope to see more will def support
wow, posted at 2 am. burning ye old candle at both ends to please the masses.
Great video as always!!!
Support what you love! Socratica has a Kickstarter to make more Python: bit.ly/PythonKickstarter