N.B. The \
continuation is unnecessary in this case since the expression is inside parentheses. Python is smart enough to know that a line continues until all brackets, braces and parentheses are balanced.
Unnecessary continuation characters are a minor bugbear of mine, and I delete them at every opportunity. They clutter the code, confuse newbies who think they are some kind of operator and can be invisibly broken by accidentally putting a space after them.
Also the first +
character is unnecessary - Python will concatenate string literals automatically.
I would also move the % operator to the end of the expression and eliminate the second +
, so the line could be rewritten as:
rows=urllib2.urlopen('http://ichart.finance.yahoo.com/table.csv?'
's=%s&d=11&e=26&f=2006&g=d&a=3&b=12&c=1996'
'&ignore=.csv' % t).readlines( )