Nested List and count() December 18, 2023 by Tarik >>> L = [[1, 2, 3], [1, 1, 1]] >>> sum(x.count(1) for x in L) 4