Global Namelist Is Not Defined. Is Only Module Variable
Ok so using this code I ran some testing to see what the main problem was. I found there is a problem with the phone number input validation so i #'ed it ,so its inactive.(if your
Solution 1:
Because Python uses indentation for scoping, the assignment namelist
has to be indented to line up with the assignment to name
. Otherwise it is in the scope outside the function, and there is no variable called namelist
there. A more helpful error message would be "line needs to be indented", but there's no way for Python to guess that.
Also, len.str(phone)
fails because it tries to get the str
attribute of len
, and it hasn't got one. You mean len(str(phone))
.
Post a Comment for "Global Namelist Is Not Defined. Is Only Module Variable"