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
  Why doesn't gc delete an object without forcing a garbage collection call? AlekseyPython 5 167 Mar-19-2019, 02:10 AM
Last Post: micseydel
  New to MySQL, can't work out why code doesn't work kintarowonders 6 143 Feb-18-2019, 05:23 PM
Last Post: kintarowonders
  why my method doesn't find my List in the same class? Scorpio 2 119 Jan-31-2019, 05:21 PM
Last Post: Scorpio
  Why doesn't strip work? cybervigilante 5 290 Dec-27-2018, 02:21 AM
Last Post: metulburr
  Doesn't look like a dictionary gehrenfeld 15 472 Dec-13-2018, 11:44 AM
Last Post: gehrenfeld
  Caesar Cypher--- I don't understand why it doesn't work ironsheep 12 558 Nov-03-2018, 06:53 PM
Last Post: j.crater
  Alien game code from book TheMusicMan 4 310 Aug-26-2018, 06:05 PM
Last Post: TheMusicMan
  os.system doesn't generate same result as shell? abc12346 1 373 Jul-24-2018, 11:41 PM
Last Post: micseydel
  len() function doesn't work with Geany Editor hudabaig 2 543 Jun-01-2018, 11:20 PM
Last Post: wavic
  Example of list comprehensions doesn't work Truman 17 1,737 May-20-2018, 05:54 AM
Last Post: buran

Forum Jump:


Users browsing this thread: 1 Guest(s)