  The evolution of the solar wind electron distribution function with
heliocentric distance exhibits different features that are still unexplained,
in particular, the increase of the Strahl pitch angle width. Wave-particle
interactions between electrons and whistler waves are often proposed to explain
these phenomena. We aim at quantifying the effect of whistler waves on
suprathermal electrons as a function of heliocentric distance. We first perform
a statistical analysis of whistler waves (occurrence and properties) observed
by Solar Orbiter and Parker Solar Probe between 0.2 and 1 AU. The wave
characteristics are then used to compute the diffusion coefficients in the
framework of quasi-linear theory. These coefficients are integrated in order to
deduce the overall effect of whistler waves on electrons along their
propagation. 110,000 whistler wave packets are detected and characterized in
the plasma frame. Most waves are aligned with the magnetic field and only about
0.5% of them have a propagation angle greater than 45{\deg}. Beyond 0.3 AU,
almost exclusively anti-sunward waves (some of them are found sunward but are
within switchbacks with a change of sign of the radial component of the
background magnetic) are observed. These waves are therefore Strahl-aligned and
not counter-streaming. At 0.2 AU we find both Strahl-aligned and
counter-streaming waves. Beyond 0.3 AU, the integrated diffusion coefficients
show that the observed waves can explain the measured Strahl pitch angle
evolution and are effective in isotropizing the halo. Strahl diffusion is
mainly due to whistler waves with an angle of propagation between 15{\deg} and
45{\deg}. Near 0.2 AU, counter-streaming whistler waves can diffuse the Strahl
electrons more efficiently than the Strahl-aligned waves by two orders of
magnitude.
