0

Edit: Python version 3.3.

I've got a Python script I'd like to run. I've added my Python/Scripts folder to the PATH, and so I open CMD and type:

python example.py

I think here's the best point to put some of the code:

while True:
    posts = user.get_submitted(limit=500) 

    print '[*] Posts' # this is line 18 
    for thing in posts:
        if thing.id in seen:
            continue

These are lines 15 to 18, and when trying to run the script I get the following error:

File "example.py", line 18
  print '[*] Posts'
SyntaxError: invalid syntax

I don't see what the issue with the syntax is here, could someone please enlighten me to it?

1 Answers1

2

You appear to be using Python 3. If that's the case, print requires parentheses:

print('[*] Posts')
NPE
  • 486,780
  • 108
  • 951
  • 1,012