Male and female betta fish should not be kept in the same tank. Male betta fish are aggressive and should never be placed with another betta fish. Female betta fish can also be aggressive and may not be able to live in a tank with other fish.
Generally, the only time male and female betta fish should be in the same tank is during the spawning process. However, once the female and male bettas mate, the female must be removed from the spawning tank. In certain cases, betta fish can live with other fish species in a large tank. However, it is best to determine if the betta fish is too aggressive to live with other fish before placing it in a community tank.