Here the solution of the String Task problem in python guys.
If anyone knows the more optimal solution please comment down bellow
import re n=input() n=re.sub("[aeiouy]*([^aeiouy])[aeiouy]*", r".\1", n.lower()) print(n)
import re n=input() n=re.sub("[aeiouy]*([^aeiouy])[aeiouy]*", r".\1", n.lower()) print(n)
Guys Anyone can suggest me why I got "wrong answer on test case 3 or 1" in fact my code produces the right output. Example:-
n=input() p=n.capitalize() if n==n.upper(): print(n) else: print(p)