2. Let $a$ be a real number, and the sequence $a_{1}, a_{2}, \cdots$ satisfies:
$$
\begin{array}{l}
a_{1}=a, \\
a_{n+1}=\left\{\begin{array}{ll}
a_{n}-\frac{1}{a_{n}}, & a_{n} \neq 0 ; \\
0, & a_{n}=0
\end{array}(n=1,2, \cdots) .\right.
\end{array}
$$

Find all real numbers $a$ such that for any positive integer $n$, we have $\left|a_{n}\right|<1$.
(Li Shenghong)
2. Discuss in two cases.
(1) The sequence $\left\{a_{n}\right\}$ contains a term that is zero. Let $m$ be the smallest positive integer such that $a_{m}=0$.
If $m \geqslant 2$, then $a_{m-1} \neq 0$. Therefore,
$$
a_{m-1}-\frac{1}{a_{m-1}}=a_{m}=0 \Rightarrow a_{m-1}= \pm 1 \text {, }
$$

which contradicts the problem statement.
Hence, only $m=1$ is possible, in which case $a_{1}=a_{2}=\cdots=0$ satisfies the condition. Thus, $a=0$.
(2) For any positive integer $n$, $a_{n} \in(-1,0) \cup(0,1)$.
It is easy to see that $a_{n}$ and $\frac{1}{a_{n}}$ have the same sign, and $\left|\frac{1}{a_{n}}\right|>1>\left|a_{n}\right|$.
Then $\left|a_{n+1}\right|=\left|a_{n}-\frac{1}{a_{n}}\right|=\frac{1}{\left|a_{n}\right|}-\left|a_{n}\right|$.
Let $b_{n}=\left|a_{n}\right|$.
Thus, $b_{n} \in(0,1)$, and $b_{n+1}=\frac{1}{b_{n}}-b_{n}$.
Therefore, $b_{n+1}-\frac{\sqrt{2}}{2}=\frac{1}{b_{n}}-\sqrt{2}-b_{n}+\frac{\sqrt{2}}{2}$
$$
\begin{array}{l}
=-\left(1+\frac{\sqrt{2}}{b_{n}}\right)\left(b_{n}-\frac{\sqrt{2}}{2}\right) \\
\Rightarrow\left|b_{n+1}-\frac{\sqrt{2}}{2}\right|=\left|b_{1}-\frac{\sqrt{2}}{2}\right| \prod_{i=1}^{n}\left(1+\frac{\sqrt{2}}{b_{n}}\right) .
\end{array}
$$

If $b_{1} \neq \frac{\sqrt{2}}{2}$, then by
$$
\prod_{i=1}^{n}\left(1+\frac{\sqrt{2}}{b_{n}}\right)>(1+\sqrt{2})^{n} \rightarrow+\infty(n \rightarrow \infty),
$$

the sequence $\left\{b_{n}\right\}$ is unbounded, which is a contradiction.
When $b_{1}=\frac{\sqrt{2}}{2}$, $a= \pm \frac{\sqrt{2}}{2}$.
Accordingly, $a_{n}= \pm(-1)^{n-1} \frac{\sqrt{2}}{2}$ satisfies the condition.
In summary, all real numbers that satisfy the condition are
$$
a=0, \pm \frac{\sqrt{2}}{2} \text {. }
$$