Bacteria generally grow their colonies in 24/48 hours in Nutrient Agar media whereas it takes 4/6 days for fungus to grow. You can simply purify your bacterial cultures prior to fungal growth. If you want to use an antifungal agent on the NA medium nystatin works well.
To Kouadri Mohamed El Amine good suggestions - I'd not recommend chloramphenicol to control fungi. The level to inhibit fungi is more than enough to inhibit bacteria.