Mar-11-2019, 11:57 AM
Hello!
I have to create a program, which will be doubles every second letter. Foe example:
input:Tom has cat.
output: Toom hhass caat.
I wrote this cod :
I have to create a program, which will be doubles every second letter. Foe example:
input:Tom has cat.
output: Toom hhass caat.
I wrote this cod :
def double(s): return ''.join(x * (y% 2 + 1) for y, x in enumerate(s)) s=input("text:") print(double(s))I have problem, because this program counts whitespace.How to fix it?