Consider this question.
Write a function translate() that will translate a text into "rövarspråket" (Swedish for "robber's language"). That is, double every consonant and place an occurrence of "o" in between. For example, translate("this is fun") should return the string "tothohisos isos fofunon".
And my solution is given below:
a=[]
a=raw_input("Enter text which you whant to translate in 'roverspraket':\n").lower()
def translate(a):
for char in a:
if char is "a" or char is 'e' or char is 'i' or char is 'o' or char is 'u' or char is ' ':
print char,
else:
print char+'o'+char,
print(translate(a))
Its output is given below:
Enter text which you whant to translate in 'roverspraket':
vinay<--- This is input
vov i non a yoy None
My question is i dont want space between these.... how can i do that?
Thanks in advance.