[Tutor] %(value1, value2) what does this returns

bob gailer bgailer at gmail.com
Tue Jul 22 20:55:51 CEST 2008


vishwajeet singh wrote:
> Hi List,
>
> def __request(symbol, stat):
>     url = 'http://finance.yahoo.com/d/quotes.csv?s=%s&f=%s 
> <http://finance.yahoo.com/d/quotes.csv?s=%s&f=%s>' % (symbol, stat)
>      return urllib.urlopen(url)
>
> I want to know in this % (symbol, stat) returns

Assume symbol = "foo" and stat = "bar".
Then url = 'http://finance.yahoo.com/d/quotes.csv?s=foo&f=bar 
<http://finance.yahoo.com/d/quotes.csv?s=%s&f=%s>

-- 
Bob Gailer
919-636-4239 Chapel Hill, NC



More information about the Tutor mailing list