Raise keyword in python
#raise is a built-in keyword used to raise exception
# visit all built-in Exceptions and understand
name=input("enter u r name:")
if name.isnumeric():
raise Exception("numbers r not allowed")#here we used raise keyword
#raise is a built-in keyword used to raise exception
# visit all built-in Exceptions and understand
name=input("enter u r name:")
if name.isnumeric():
raise Exception("numbers r not allowed")#here we used raise keyword
Comments
Post a Comment