Pomegranate, hawthorn, persimmon, black jujube, etc. Both contain tannins. Generally speaking, the role of tannins is astringent and has the effect of stopping diarrhea. So eating this kind of food can alleviate the symptoms of diarrhea to some extent. People with constipation should eat less.
However, there are many reasons for diarrhea. Eating pomegranate may not be symptomatic anyway, and the tannin content in the peel is usually much higher than that in the pulp. Eating pomegranate seeds is not as good as eating pomegranate peel (it is difficult to eat directly, usually boiled in water). The efficacy of pomegranate may not be particularly strong, so it is better to take a few antidiarrheal drugs. If you have severe diarrhea, you'd better see a doctor.
Common diarrhea is an instinctive reaction of human stomach. It may have eaten something unclean, toxic or unacceptable to the stomach. It will try its best to secrete a lot of water and squirm out these things quickly. This is a good cleaning and detoxification. Therefore, don't stop diarrhea as soon as you have diarrhea. If it doesn't seriously affect your work and life, don't take medicine, but drink more water to help your stomach speed up this cleaning. If diarrhea is caused by bacillary dysentery or other malignant diseases, it is more important to "treat the symptoms" instead of taking antidiarrheal drugs to suppress it.