0
import urllib
url = urllib.urlopen("http://chart.finance.yahoo.com/table.csv?\
s=%s&a=6&b=19&c=2016&d=9&e=18&f=2016&g=d&ignore=.csv").read() % ("GOOGL")
print url
上面的代码工作得很好,如果我在URL中输入GOOGL。当我尝试以字符串格式化时,为什么会出现此错误?不支持的格式字符
ValueError: unsupported format character '/' (0x2f) at index 319
谢谢shaun! – lennisquinn