Please right this as `if ord("A") <= ord(c) <= ord("Z")` same for the others.