why we use try except block in python code example
Example: try except python
age = input('age:')
try:
new_age = int(age)
except ValueError: # if age is not convertable to int
print('please enter a number...')
age = input('age:')
try:
new_age = int(age)
except ValueError: # if age is not convertable to int
print('please enter a number...')