run ด้วย python จาก error ข้อความด้านล่าง
IndentationError : expected an inddented block จุดที่ error final_url
ต้องการวน loop ค่าใน b
from urllib import quote
import webbrowser
new = 2 # not really necessary, may be default on most modern browsers
base_url = "http://www.localhost.com/hl=en&q="
base2_url = "&cmpt=q&tz&tz&content=1&export=1"
######
b = ['warcraft', 'hon', 'microsoft']
for index in range(len(bu)):
from urllib import quote
import webbrowser
new = 2 # not really necessary, may be default on most modern browsers
base_url = "http://www.localhost.com/hl=en&q="
base2_url = "&cmpt=q&tz&tz&content=1&export=1"
######
b = ['warcraft', 'hon', 'microsoft']
for index in range(len(b)):
#####
final_url = base_url + quote(b) + base2_url
webbrowser.open(final_url, new=new)
print ('download file finished:', b[index])
#####
print ("Good bye!")