new zwitterionic polymers are obtained as the copolymerization product of : from about 30 to about 70 mole % of monomers containing quaternary ammonium groups and corresponding to the following formula : r . sup . 1 -- ch ═ cr . sup . 2 -- co -- z ---- n . sup . 3 ; about 10 to about 30 mole % of monomeric carboxylic acids corresponding to the following formula : r . sup . 3 -- ch ═ cr . sup . 4 -- cooh ; about 10 to about 30 mole % of monomeric esters corresponding to the following formula : r . sup . 5 -- ch ═ cr . sup . 6 -- coor . sup . 7 ; and , optionally , 0 to about 40 mole % of monomers containing tertiary amino groups and corresponding to the following formula : r . sup . 8 -- ch ═ cr . sup . 9 -- co -- z ---- nr . sup . 10 r . sup . 11 . the zwitterionic polymers are suitable for the production of hair - washing and hair - care preparations which have a long - lasting hair - softening effect .