Skip to content
Discussion options

You must be logged in to vote

Hay muchoos detalles en tu codigo, veamos.
• El metodo split() no modifica el String text si no que regresa un nuevo List de Strings el cual lo tienes que asignar a una variable para poder usarlo. Tal ejemplo seria:
nuevo_text = text.split() o incluso text = text.split()
Practicamente esto soluciona un 50% de los errores 😎
• Tip: Usa variables descriptivas, hace que te equivoques menos en tu propio codigo, asi como se vuelve mas entendible para otras personas. Por ejemplo for i in text: podria ser for sentence in text para saber que la variable es una oración.
• El metodo find() no funciona en Lists, de hecho text ni siquiera deberia de estar en la linea 4, ya estas iterando en el!
Entonces

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by RaulRU30
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants