Find the index of first non num element

def get_not_num(self, seq, num=0):
        '''Find the index of first non num element'''
        ind = next((i for i, x in enumerate(seq) if x != num), None)
        if ind == None:
            return self.board_size
        else:
            return ind