python check if string contains digits only