Python Forum

Full Version: This doesn't work like in book
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Does anyone understand why these phrases:

>>>phrase = "the surprise is in here somewhere"
>>> phrase.find("surprise")
Doesn't return the number 4, when executed in the IDLE. I get he following error message: "SyntaxError: multiple statements found while compiling a single statement"

I run the 32 bit version due to... a lot of reasons that I can't change. Maybe that has something to do with it?

Thanks
/Martin

İmage
reverted the post. If you find the answer post it, do not just remove the content. Consider if you ask a question and answer it yourself you are contributing to the forum.
https://python-forum.io/misc.php?action=help&hid=32