Accepted answer

you may use the following:

list = => x.where(i => i % 2 == 1).tolist())
           .where(x => x.any())

here, we're using select() to iterate the elements of the outer list, then using where() to filter the inner list. after that, we call where() on the outer list to filter out empty inner lists. that last part is optional; feel free to remove it if you need to keep empty lists.

note: as @dmitry stated in the comments, it's probably better to use i % 2 != 0 if you want to keep negative odd numbers.

Related Query

More Query from same tag