我遇到错误
for quote in quotes:
^
IndentationError:unindent与任何o不匹配子宫压痕水平
以下代码:-
if __name__ == "__main__":
# Query the price once every N seconds.
for _ in iter(range(N)):
quotes = json.loads(urllib.request.urlopen(QUERY.format(random.random())).read())
""" ----------- Update to get the ratio --------------- """
prices = {}
for quote in quotes:
stock, bid_price, ask_price, price = getDataPoint(quote)
print ("Quoted %s at (bid:%s, ask:%s, price:%s)" % (stock,bid_price, ask_price, price))
print ("Ratio %s" % getRatio(prices['ABC'], prices['DEF']))
quotes = json.loads(urllib.request.urlopen(QUERY.format(random.random())).read())