We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f2fd2c2 commit cf63762Copy full SHA for cf63762
10X/Python/Class/Make Palindrome.py
@@ -30,7 +30,7 @@
30
s=input()
31
n=int(input())
32
if n==0 and len(s)>1:
33
- print(s+s[:-(len(s)+1):-1])
+ print(s+s[:-(len(s)+1):(-1)])
34
elif n==1 and len(s)>1:
35
print(s+s[-2:-(len(s)+1):-1])
36
if(len(s)==1):
0 commit comments