type error 2

This commit is contained in:
Mert Gör 🇹🇷 2023-08-16 16:39:39 +03:00
parent 546959c188
commit 52113294ad
No known key found for this signature in database
GPG key ID: 2100A876D55B39B9
2 changed files with 17 additions and 0 deletions

View file

@ -0,0 +1,9 @@
def foo():
return 10 + 'ali'
try:
foo()
except ValueError:
print('ValueError occured...')
except TypeError:
print('TypeError occured...')
print('continues...')

View file

@ -0,0 +1,8 @@
def foo():
return 10 + 'ali'
try:
foo()
except ValueError:
print('ValueError occured...')
except TypeError:
print('TypeError occured...')