+ 1

What is the difference between raise and except statements?

26th May 2020, 4:51 PM
RookieđŸ€“
RookieđŸ€“ - avatar
2 Answers
+ 1
simple example:- mynumber = 10 try: if mynumber > 9: raise ValueError except ValueError: print("Number to large")
26th May 2020, 5:06 PM
rodwynnejones
rodwynnejones - avatar