I'm writing a script like the following:
In the input for text, I'll write a word, and if the letter in that word is abcde
it will just print the letter, else its going to print the letter + o
and then the letter again.
For the result right now, I get (for example the text = allan), "a lil lil a nin".
I want the result to be: "alillilanin".
How do I remove the whitespace?
def sprak(text):
bok = "abcde"
for letter in text:
if letter in bok == bok:
print letter,
elif letter != bok:
print letter+"u"+letter,
text = raw_input("what word ")
sprak(text)