from urllib import request
google_url='https://www.stats.govt.nz/assets/Uploads/Annual-enterprise-survey/Annual-enterprise-survey-2017-financial-year-provisional/Download-data/annual-enterprise-survey-2017-financial-year-provisional-size-bands-csv.csv'
def dooo(csv_url):
response= request.urlopen(csv_url)
csv=response.read()
csv_str=str(csv)
lines = csv_str.split('\\n')
dest_url=r'google.csv'
fx=open(dest_url,"w")
for line in lines:
fx.write(line +"\n")
fx.close()
dooo(google_url)
此程序应创建一个csv文件并显示输出 但没有显示任何结果