try: raise ValueError except ValueError: print('There was an exception.') The code above demonstrates how to raise an exception. Here is the output:
確定! 回上一頁