def palindrome(sentence): sentence2 = sentence[::-1] sentence3 = sentence2[1:] new_sentence = sentence + sentence3 print(new_sentence) sentence = input("文を入力してください。") palindrome(sentence)