Hi
I’m new here and I need help.
I try to solve a palindrome(?) problem (anna can be read in both ways)
phrase = "anna"
#Vérifier le nombre de lettres
x = len(phrase)
print(x)
mot_1_inversé = ""
if x%2 == 0:
y = x/2
print(y)
mot_1 = phrase[0:y]
print(mot_1)
TypeError: slice indices must be integers or None or have an index method
I don’t know what is wrong…
Thanks for your help