How to count a zip list?

how to count a zip list?
if a list like print(pizzas) ==>(1,‘cheese’),(2,‘pepper’),…
i try pizzas.count([1,'chesse]) not work

Not sure I follow your question. If it refers to zip objects, then there is no way to count the length. zip has no len(). We can re-cast it to a list, which does have a len(). Once we convert it to a list, the zip object will be consumed.

>>> a = list('abcdefghijklm')
>>> b = [1,2,3,4,5,6,7,8,9,10,11,12,13]
>>> z = zip(a,b)
>>> c = list(z)
>>> d = list(z)
>>> len(c)
>>> len(d)

nah, i mean count the object the time they appear

BUT: why c and d in your answer are different?

c = list(z)
d= list(z)

Still not sure what you mean. Can you help illustrate what it is you wish top count? Is it a zip object or just a list of tuples?

c consumes the zip object when it is cast to a list. That is why d is an empty list.