trying to make a program that says, when it's an estonian post code or not. Estonian post code has 5 numbers. first number is between 1 and 9. Other four numbers are between 0 and 9. My code at the moment:
print("insert postcode")
inserted_code = input()
if (inserted_code[0] > "0" and inserted_code[1-4] >= "0"):
print("Estonian postcode")
elif (inserted_code[0] == "0"):
print("Not an estonian code")
else:
print("Not an estonian code")
My question is, how can I mak it that way, that the program knows that Estonian post code has 5 numbers?