max() arg is an empty sequence
<p>I have written a program for Radix Sort in Python. But when I execute the code I get following error message <code>max() arg is an empty sequence</code>.
Here is my code:</p>

<pre><code>class RadixSort:
    num=0
    array=[]

    def getData(self):
        print 'Enter the number of elements you want to enter: '
        num=int(input())
        print 'Now enter the elements: '
        for i in range(0,self.num):
            print 'Element ',i+1,': '
            value=int(input())
            self.array.append(value)

    def radixSort(self):
        bin=[[],[],[],[],[],[],[],[],[],[]]
        r=1
        m=max(self.array)
        while m&gt;r:
            for ele in self.array:
                bin[(ele/r)%10].append(ele)
            r=r*10
            self.array=[]
            for i in range(10):
                self.array.extend(bin[i])
                bin[i]=[]       

    def displayArray(self):
        print ''
        for ele in self.array:
            print ele


RObject=RadixSort()
RObject.getData()
RObject.radixSort()
RObject.displayArray()
</code></pre>

<p>I get this error before entering values in array. How can I solve this?</p>