0

error says ValueError: substring not found, whats wrong?

I am making this deciphering code and Im stuck with this error. Instead of printing the world with every letter three letters in the alphabet back it prints the first letter one place back and then gives me the error. Please help https://code.sololearn.com/c9E879RF8Qb5

26th May 2020, 6:04 PM
Elias Kamakas
Elias Kamakas - avatar
1 Réponse
+ 2
You're missing the letter 'e' from the az list. Also you need while i < size: Instead as <= will give an index out of bounds error. You are aware that there is a built in split() method that will do what you're doing with yours? cypher.split('') does the same thing. Better yet you can just convert to a list like. letters = list(cypher) Which again does the same thing.
26th May 2020, 7:23 PM
ChaoticDawg
ChaoticDawg - avatar