In,
a=int(input("Enter A Integer: "))
How Can I Prevent The User From Entering More Than 4 Digits In This Input
In,
a=int(input("Enter A Integer: "))
How Can I Prevent The User From Entering More Than 4 Digits In This Input
You cannot prevent user from entering as many digits he want, but you can always check the size, and prompt the user to reenter if it exceeds it.
a=10001
while a > 9999 :
a = int(input("Enter A Integer less than 9999: "))
Of course you would need exception handling if he passes a string instead of number.