I have a list of apple and pear products and I want to print on the screen how many apples there are by if
but only print the "no apples". Where is the error and how can I fix it?
This is my code:
p = ["manzana_00", "manzana_01", "manzana_02",
"pera_00", "pera_01", "pera_03"]
for i in p:
if i == "manzana_*":
print i + " es manzana"
else:
print "nada hay manzanas"