我有,当我从多个网站IndentationError:预计在while循环的缩进块
import urllib
urls = ["http://google.com","http://cnn.com"]
i=0
n=len(urls)
while i< n:
htmlfile = urllib.urlopen(urls[i])
htmltext =htmlfile.read()
print htmltext
i=i+1
错误尝试网络刮此错误:
PS C:\python> python basic1.py
File "basic1.py", line 9
htmlfile = urllib.urlopen(urls[i])
IndentationError: expected an indented block