[Tutor] a quick Q: how to use for loop to read a series of files with .doc end

Andreas Perstinger andreas.perstinger at gmx.net
Wed Oct 5 07:51:00 CEST 2011

On 2011-10-05 05:13, lina wrote:
> $ python3 counter-vertically.py
>    File "counter-vertically.py", line 20
>      print item
>               ^
> SyntaxError: invalid syntax

In Python 3 print is a function: print(item)

In another message in this thread you've said:
"Sorry, I am still lack deep understanding about something basic."

IMHO you should take the time to read the tutorial (as others have 
already told you) before continuing your work:

Bye, Andreas

More information about the Tutor mailing list