String Validation Methods In Python