try:
number = int('hello')
print('Valid')
except ValueError:
print('Invalid')
Invalid Valid ValueError hello valid = False
try:
number = int('ten')
valid = True
except ValueError:
valid = False
print(valid)
ten False True 0 You can still revise this topic