Question About Running Python code
Andrew Jaffe
a.h.jaffe at gmail.com
Thu Oct 16 04:11:06 EDT 2014
On 15/10/2014 23:50, ryguy7272 wrote:
> The error that I get is this.
> 'invalid syntax'
>
> The second single quote in this line is highlighted pink.
> print 'Downloading data from Yahoo for %s sector' % sector
This is a script written for Python 2.*, but you say you are using
Python 3.4. In Python 3, "print" is a function, not a statement, so you
need to translate this to
print('Downloading data from Yahoo for %s sector' % sector)
More information about the Python-list
mailing list