Text: Apple
AppleApple
ppleAppl
pleApp
leAp
eA
It’s a pattern that removes the first and last character of a string being doubled.
I have tried a code but it’s wrong.
t=input('Text: ')
t=list(t)
t1=t+t
for w in t1:
print(w,end='')
t1.remove(t1[0])
t1.remove(t1[-1])
print(w,end='')
output:
AAppAAll
What’s wrong? Thanks