NameError: global name 'isdigit' is not defined. Cannot Understand what this python error means, this is my work using Kivy and python
<pre><code>class ScatterText(ScrollView):
    def val_change(self):
        label = ['bar','1','2','3','4','5','6','7','8','9','10','11','12','13']
        label_b = self.ids['bar']
        label[1] = self.ids['1']
        label[2] = self.ids['2']
        label[3] = self.ids['3']
        label[4] = self.ids['4']
        label[5] = self.ids['5']
        label[6] = self.ids['6']
        label[7] = self.ids['7']
        label[8] = self.ids['8'] 
        label[9] = self.ids['9']
        label[10] = self.ids['10']
        label[11] = self.ids['11']
        label[12] = self.ids['12']
        label[13] = self.ids['13']
        set_val = 0

        if not(label[1].text == ''):
            set_val+=100
        if not(label[2].text == ''):
            set_val+=100
        if not(label[3].text == ''):
            set_val+=100
        if not(label[4].text == ''):
            set_val+=100
        if not(label[5].text == ''):
            set_val+=100
        if not(label[6].text == ''):
            set_val+=100
        if not(label[7].text == ''):
            set_val+=100
        if not(label[8].text == ''):
            set_val+=100
        if not(label[9].text == ''):
            set_val+=100
        if not(label[10].text == ''):
            set_val+=100
        if not(label[11].text == ''):
            set_val+=100
        if not(label[12].text == ''):
            set_val+=100
        if not(label[13].text == ''):
            set_val+=100
        label_b.value =  set_val

    def pass_valid(self):
        pass_w = self.ids['2']
        uCase = 0
        lCase = 0
        num = 0
        splChar = 0
        lent = 0
        VAL = pass_w.text
        _suggest = ""
        _valid = self.ids['MSG']
        if len(VAL)&lt;8 or len(VAL)&gt;16:
            lent = 0
        else:
            lent = 1
        for i in range (0,len(VAL)):
           if isupper(VAL[i]):
               uCase = 1
           if islower(VAL[i]):
               lCase = 1
           if isdigit(VAL[i]):
               num = 1
           if (not(islower(VAL[i])) and not(isdigit(VAL[i]))):
               splChar = 1      
        if not(uCase):
            _suggest = _suggest + "\n Password Must Have One Upper Case Char."
        else :
            _suggest = _suggest + " "
        if not(lCase):
            _suggest = _suggest + "\n Password Must Have One Lower Case Char."
        if not(num):
            _suggest = _suggest + "\n Password Must Have One Digit."
        if not(splChar):
            _suggest = _suggest + "\n Password Must Have One Special Char."
        if not(lent):
            _suggest = _suggest + "\n Password Must Be Between 8 and 16 characters long\n"

        _valid.text = _suggest
    def pass_work(self):
        self.val_change()
        self.pass_valid()



class MyApp(App):
    def build(self):
        return (ScatterText())
        #textinput = TextInput()
        #input = TextInput(focus=True)



if __name__ == "__main__":
    MyApp().run()
</code></pre>

<p><code>isdigit()</code> is a method on string objects, not a standalone method.</p>

<p>In other words, you call it like this:</p>

<pre><code>s = '1'
if s.isdigit():
    print 's is a digit!'
</code></pre>

python