+ 1
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
2 Réponses
+ 6
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!
+ 1
Thank you very much, it worked!