This is a part of my program. It gives the error NameError: name 'urlss' is not defined
NameError: name 'urlss' is not defined
def testfunc(): urlss = "hey" return urlss print urlss
Why does this occur?
urlss is a variable local to the scope of testfunc(); it cannot be accessed elsewhere. You might mean
urlss
testfunc()
print testfunc()
which in this case prints urlss, since that's what testfunc() returns.
1.4m articles
1.4m replys
5 comments
57.0k users