0

String functions

I have been trying to run this code for a while now but I am unable to and I can't also find the bug even though it keep saying that the bug in line 5. Please can anyone assist me here? https://sololearn.com/compiler-playground/cAyyIw3cw7KL/?ref=app

24th Jun 2025, 1:42 PM
Emman
Emman - avatar
2 Respostas
+ 5
Try the last line like this: print(Animal.find("e")) Just as a note, you notice how the Capital A in Animal changes the colour of the text to blue, that's because the interpreter is thinking that your variable is actually something like a class or function. Better to do the variable with a lower case a, e.g. animal = "Bee" Hope it helps!
24th Jun 2025, 1:53 PM
Ausgrindtube
Ausgrindtube - avatar
+ 1
Thank you very much, it worked!
24th Jun 2025, 3:50 PM
Emman
Emman - avatar