Python Forum
This doesn't work like in book - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: This doesn't work like in book (/thread-15359.html)



This doesn't work like in book - Blaedel - Jan-14-2019

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



RE: This doesn't work like in book - metulburr - Jan-14-2019

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