Java Validate String Not Equal Python 3