10. (20 points) The function $f(x)$ defined on $[0,1]$ satisfies: $f(0)=f(1)$, and for any $x, y \in [0,1]$ $(x \neq y)$, we have $|f(x)-f(y)|<|x-y|$. Find the smallest real number $m$, such that for any $x, y \in [0,1]$, we have
$$
|f(x)-f(y)|<m .
$$
10. (1) Prove: For all $x, y \in [0,1]$, we have
$$
|f(x)-f(y)|\frac{1}{2}$, without loss of generality, assume $0 \leqslant x < y \leqslant 1$. Then
$$
\begin{array}{l}
|f(x)-f(y)| \\
=|f(x)-f(0)+f(1)-f(y)| \\
\leqslant|f(x)-f(0)|+|f(1)-f(y)| \\
<x+1-y<\frac{1}{2} .
\end{array}
$$
(2) For the function
$$
f(x)=\left\{\begin{array}{ll}
\lambda x, & 0 \leqslant x \leqslant \frac{1}{2} ; \\
\lambda(1-x), & \frac{1}{2}<x \leqslant 1
\end{array}(0<\lambda<1) .\right.
$$

If $0 \leqslant x < y \leqslant \frac{1}{2}$ or $\frac{1}{2}<x<y \leqslant 1$, then
$$
|f(x)-f(y)|=\lambda|x-y|<|x-y| \text {. }
$$

If $0 \leqslant x < \frac{1}{2} < y \leqslant 1$, then
$$
|f(x)-f(y)|=\lambda|x+y-1| \text {. }
$$

When $x+y \geqslant 1$,
$$
|x+y-1|=x+y-1<y-x \text {; }
$$

When $x+y<1$,
$$
|x+y-1|=1-x-y<y-x \text {. }
$$

Thus, $|f(x)-f(y)|=\lambda|x+y-1|<|x-y|$. In summary, $f(x)$ meets the requirement, and
$$
f\left(\frac{1}{2}\right)-f(0)=\frac{\lambda}{2}<m(0<\lambda<1) \text {. }
$$

Therefore, $m \geqslant \frac{1}{2}$.
From (1) and (2), we know $m=\frac{1}{2}$.