I have to check if the input year is a a valid 4 digit no. Which isn't a float value or has more than 4 characters. The input is from a file dictionary type.
If not I want to exit the program and don't want to continue with the steps and functions after.
But the only challenge is I'm trying to do it without the use of libraries like sys etc. Is this possible in Python?
exit()is builtin. You can just use it.