Python Forum
This doesn't work like in book
Thread Rating:
  • 3 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
This doesn't work like in book
#1
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
Reply
#2
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
Recommended Tutorials:
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  PIP doesn't work YKR 1 679 Mar-28-2025, 02:10 PM
Last Post: snippsat
  I'm trying to install python 3.11.11 on windows 10 - it doesn't work Petonique 2 1,813 Feb-04-2025, 05:42 PM
Last Post: snippsat
  Extending list doesn't work as expected mmhmjanssen 2 1,383 May-09-2024, 05:39 PM
Last Post: Pedroski55
  Why doesn't calling a parent constructor work with arbitrary keyword arguments? PurposefulCoder 4 1,911 Jun-24-2023, 02:14 PM
Last Post: deanhystad
  Why doesn't this code work? What is wrong with path? Melcu54 7 3,511 Jan-29-2023, 06:24 PM
Last Post: Melcu54
  color code doesn't work harryvl 1 1,839 Dec-29-2022, 08:59 PM
Last Post: deanhystad
  client.get_all_tickers() Doesn't work gerald 2 2,585 Jun-16-2022, 07:59 AM
Last Post: gerald
  pip doesn't work after Python upgrade Pavel_47 10 6,752 May-30-2022, 03:31 PM
Last Post: bowlofred
  For Loop Works Fine But Append For Pandas Doesn't Work knight2000 2 3,016 Dec-18-2021, 02:38 AM
Last Post: knight2000
  Class Method to Calculate Age Doesn't Work gdbengo 1 2,527 Oct-30-2021, 11:20 PM
Last Post: Yoriz

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020