'Return a random element from a (non-empty) sequence.
If the seqence is empty, raises IndexError.'

def choice(self, seq):

    if (len(seq) == 0):
        raise IndexError('empty    sequence')
    return seq[self.randrange(len(seq))]
