def solve(s): if s.isalnum(): Empty= s.split() Empty2= "" for string in Empty: if isinstance(string, str): if any(char.isdigit() for char in string): Empty2 += string.lower() Empty2 += " " else: Empty2+= string.capitalize() Empty2+= " " return Empty2 else: return s.title()
if any(char.isdigit() for char in string): Empty2 += string.lower() Empty2 += " "
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)