Let $X$ bet a subset of $R$, and let $f : X \rightarrow R$ be a continuous function. If $Y$ is a subset of $X$, show that the restriction $f|_Y : Y \rightarrow R$ of $f$ to $Y$ is also a continuous function.
My attempt
The definition of continuity is, let $X$ be a subset of $R$ and let $*F*$ : $X \rightarrow \mathbb{R}$ be a function. Let $x_0$ be an element of $X$. We say that $F$ is continuous at $x_0$ iff $\lim_{x \to x_0;x \in X}$. After this, I'm not sure how to continue with the proof.