Let $f$ be entire as well as real-valued along the lines $\operatorname{Im}(z)=0$ and $\operatorname{Im}(z)=\pi$. Show that $f$ is $2\pi\mathrm i$ periodic under these circumstances, that is $f(z+2\pi\mathrm i)=f(z)$ for all $z\in\mathbb C$.
Let $g(z):=\overline{f(\overline z)}$ and we will show that $g$ is entire and using its properties we will prove the periodicity.
Claim. $g(x)=f(x)$ for all $x\in\mathbb R$
Proof. $$g(x) = \overline{f(\overline x)} \overset{x\in\mathbb R}{=} \overline{f(x)} \overset{\operatorname{Im}(x)=0}{=}f(x)$$
Claim. $g(z)=f(z)$ for all $x\in\mathbb C$
Proof. Let $\{z_n\}_{n\in\mathbb N}\subset \mathbb C$ be a sequence of complex numbers with $\operatorname{Im}(z_n)=0$ for all $n\in\mathbb N$. By 1. it follows that $g(z_n)=f(z_n)$ for all $n\in\mathbb N$ hence from the identity theorem we know that $g$ is entire iff $f$ is entire as well.
Claim. $f$ is $2\pi\mathrm i$ periodic.
Proof. Let $z=w+\mathrm i\pi,w\in\mathbb C$ hence $$f(z) = f(w+\mathrm i\pi) \overset{2.}{=} g(w+\mathrm i\pi) \overset{1.}{=} \overline{f(\overline{w+\mathrm i\pi})} = \overline{f(w-\mathrm i\pi)} \overset{(*)}{=}f(w-\mathrm i\pi)=f(z-2\pi\mathrm i).$$ For $(*)$ it holds that $\operatorname{Im}(z)=\pi\implies f(z)\in\mathbb R$.
Are there any objections or improvements to my approach? I especially wanted to stick with my function $g$ as it turned out to be quite helpful.