Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Handling Exceptions

>>> while True:
...     try:
...         x = int(input("Please enter a number: "))
...         break
...     except ValueError:
...         print("Oops!  That was no valid number.  Try again...")
...
Source by docs.python.org #
 
PREVIOUS NEXT
Tagged: #Handling #Exceptions
ADD COMMENT
Topic
Name
7+7 =