I have this function:
def cesar():
n = int(raw_input("Introdueix la teva clau: "))
f = raw_input("Introdueix la frase a xifrar: ")
for ch in f:
xifrat = int(ord(ch)+int(n))
textxifrat = chr(xifrat)
print textxifrat,
cesar()
And I want to remove the spaces from the output or the string.
Problem is if I use the .replace
Python says that it can't be applied to a str and I don't know any other way to remove those spaces.
The idea is that I want something like this: M t q f % v z j % f x j
to become this: Mtqf%vzj%fxj