I really struggled to understand the try and except before watching this. You explained it quickly and clearly and now I feel very confident with it. Thanks!
Thanks much for these videos! They are super helpful to me as a novice who is hoping to teach myself to code over the next year. One question, when should try&except be used instead of if statements?
You should use try & except for errors that would stop the code from running. If statements you can use it like a try&except to filter input, it wont catch error codes
Hii Tim after running a code I'm getting an error like this:- code: myList = [97,98,99,100] myList[1:1] = -40 print(myList) TypeError: can only assign an iterable
In some situations, if-else would handle the exception as well (by checking data type, for example), but in other situations, some errors and exceptions can't be caught by an if statement.
I really struggled to understand the try and except before watching this. You explained it quickly and clearly and now I feel very confident with it. Thanks!
Great work broo. I was confused about this, you helped me a lot. You described it very clearly. THANKS. SUBSCRIBED
real practical examples help to understand the purpose of the function and you did it....🙂 thanks
Thanks much for these videos! They are super helpful to me as a novice who is hoping to teach myself to code over the next year. One question, when should try&except be used instead of if statements?
You should use try & except for errors that would stop the code from running.
If statements you can use it like a try&except to filter input, it wont catch error codes
@@mordekai23 yo great answer
Thanks Tim, this tutorial helped me a lot.
Hey man, great video. Thanks for posting it.
Zoe Mushrooms
Wrong post 😂 Sorry!
When is your next video? :D Keep it up!
Best tuts on yt!
Perfect and concise!
Nice and clear. Great video
Ur amazing! Thanks so much for these amazing tutorials.
Nice I got the 200th Like, So satisfying
So under that except block can you do a print function for a user input to try again?
thank you tim, you clear my doubts
Nice video
Watched at 2x
Meet you in next one
If the 'try' function works, do you leave it in the program or do you replace it with an 'if' or something else...?
Nice video
Thank you very much for your video.
great tutorial
Hii Tim after running a code I'm getting an error like this:-
code:
myList = [97,98,99,100]
myList[1:1] = -40
print(myList)
TypeError: can only assign an iterable
Try this:
myList = [97,98,99,100]
myList[1] = -40
print(myList)
great video
How is this any different than if-else?
so what if you removed except?
Who here noticed that he changed the position of Minecraft
very good
can someone tell me the difference between this and the 'if' and 'else' statement?
In some situations, if-else would handle the exception as well (by checking data type, for example), but in other situations, some errors and exceptions can't be caught by an if statement.
You play Minecraft, Nice
Morty wsp
u savedm y life
its just "If and Else" why we have to use this??
Still crashes bc it uses an excel file, I want to avoid crash when run and the file is open :(
so except and try go together
this does not work...
"do or do not, there is no try"
-yoda
Hat mir nicht geholfen. Hab lieber David gefragt.