What are some good foods or medications to help constipation or to help not get constipated?

Fruit,Veg,MiraLax (polyethylene glycol) High fiber fruit and vegetables are good to avoid constipation, prunes, prune juice, figs and syrup of figs are best natural laxatives or preventatives. Firm bananas, milk and cheese can constipate. Good "natural type" mediacations are MiraLAX (polyethylene glycol) or benefiber. Colace + pericolace are safe + effective to prevent + treat. Senakot, exlax and Dulcolax are much stronger + very effective when constipated.
Fruits and veggies. Some fruits are better than others at helping constipation. Grapes and raisins are better than bananas, for instance. The whole fruit - apples with the skin is better than applesauce. Adolescents and adults should aim for 25 grams of fiber daily but doing so gradually over several days. Veggies including beans and lentils are great. Drink plenty of water. Don't have excess fiber[>25].
Fruits and vegies. In general things with one large seed like peaches and plums have a lot of fiber. Similarly things with lots of little seeds like blackberries are high in fiber. Avoid bananas, avocato, white rice, white bread, applesauce and tortillas.
Constipation. Eating healthy food with high amounts of fiber, like fruits and vegetable help with constipation. Avoid large amount of dairy products may help too. Medications help in the short terms, but should be avoided long term.