Let $\mathcal{H}$ denote a separable Hilbert space. How would one construct a nonzero operator $T \in B(\mathcal{H})$ such that $T^2 = 0$? Here $B(\mathcal{H})$ is the set of bounded linear operators.
My current suggestion is to define $T$ such that $T(x_1,x_2,\dotsc) = (x_2,0,0,\dotsc)$, but I don't know if this even makes sense?
Your example is perfectly fine. Also, if $dim\; \mathcal H = 1$, the only linear Operator is multiplication by a scalar, so then $T^2=0$ already implies that $T$ is the null operator.