小弟想問個很基本的問題
當執行這段code的時候(找網頁連結的)
def get_next_target(page):
start_link = page.find('<a href=')
start_quote = page.find('"', start_link)
end_quote = page.find('"', start_quote + 1)
url = page[start_quote + 1:end_quote]
return url, end_quote
get_next_target('The site is called Google <a href= "www.google.com">')
print url
為什麼系統會說 name 'url' is not defined
謝謝!