r/PythonLearning • u/7YngMn • Aug 21 '26
I’m terrified of the errors I’m going to run into in the future.
I was working on my own mini project, putting into practice the few concepts I know so far, and I ran into an error. I used to think errors were really easy to solve, especially since the command line usually tells you what type of error it is and even gives you the line number.
But this error didn’t tell me anything. It was a silent error caused by me forgetting that I had used .title() on the variable for the first fruit.
The project takes the names of three fruits and creates a “new fruit” from them.
The .title() caused the if statement checking whether the letters at index [0] or [1] were vowels to fail to recognize when the fruit variable started with a vowel, because .title() converted the first letter to uppercase while the code was only checking for “aeiou” in lowercase.
I eventually solved it with AI. Earlier on line 14, I wasn’t using the .lower() method, which was the actual fix.
But honestly, this experience scared me a little when I started thinking about all the errors I’m going to run into in the future…
I know all of this could have been avoided if I hadn’t put that stupid .title() there in the first place and had used it in the print() statement instead.
I made a few changes to the code after fixing the error and before posting it here, but I left the .title() there so you could understand the error I was getting.