Bottom Page

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
You like this post
Quote
#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
You like this post
Quote

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  Regex Issue from Automate the Boring Stuff book robgraves 2 112 Jun-16-2019, 12:41 AM
Last Post: robgraves
  a contact book - a class made to store data apollo 2 174 Jun-12-2019, 04:33 PM
Last Post: apollo
  Why doesn't my loop work correctly? (problem with a break statement) steckinreinhart619 2 162 Jun-11-2019, 10:02 AM
Last Post: steckinreinhart619
  Python Script Spawned by Cron or Systemd doesn't write files..? johnnyrobot 2 135 May-24-2019, 07:04 PM
Last Post: Larz60+
  Python requests module doesn not return status_code palo173 5 165 May-21-2019, 09:22 AM
Last Post: buran
  Python says module doesn't exist... I say it does! EricMichel 2 135 May-14-2019, 03:26 AM
Last Post: EricMichel
  creating an 'adress book' in python using dictionaries? apollo 6 230 May-06-2019, 12:03 PM
Last Post: snippsat
  Python Code doesn't work! the_entrepreneur 5 209 Apr-20-2019, 08:05 AM
Last Post: SheeppOSU
  Why doesn't gc delete an object without forcing a garbage collection call? AlekseyPython 5 295 Mar-19-2019, 02:10 AM
Last Post: micseydel
  New to MySQL, can't work out why code doesn't work kintarowonders 6 247 Feb-18-2019, 05:23 PM
Last Post: kintarowonders

Forum Jump:


Users browsing this thread: 1 Guest(s)