Search code examples
pythonsyntax-error

Python thinks code the is wrong


Hi in my python script i keeps saying this code is wrong,

print "mix up script (c) Ioan Loosley"

After it runs python ide highlights the " at the end does any one know why is doing that.

The only line above this code says, import random

sorry just noticed thanks to one of the comments that i wasn't using python 2.7


Solution

  • I am going to assume you are using python 3.0?

    You need to include parenthesis like so:

     print("mix up script (c) Ioan Loosley")
    

    http://docs.python.org/3.0/whatsnew/3.0.html#print-is-a-function