10/10 syntaxe error and error message


hello everyone ,

pyg = 'ay'

original = raw_input('Entrez un mot :')

if original.lower() and len(original) > 0 and original.isalpha():
print original
print 'vide'
nouveau_mot = mot + original + pyg
nouveau_mot = nouveau_mot[1:len.(nouveau_mot)]
print original

                                I don't understand why there are :

File "python", line 12
nouveau_mot = nouveau_mot[1:len.(nouveau_mot)]
SyntaxError: invalid syntax

                              and :

Oops , thank you again. Make sure that you assign the translation to nouveau_mot in the else branch of your if / else .

:neutral_face: :slight_smile:


The correct usage of len is len("String"). (remove the dot)


Thank you very much for your help


You're welcome :slight_smile: