I'm writing a table and I'm trying to import its contents from an external file. Curiously, I found out that when importing the contents TeX seems to add a weird space to the last entry. This does not occur when I copy the contents from the external file and paste them directly on the document. How can I fix this behavior?
MWE:
\documentclass[margin=0.1cm]{standalone}
\begin{filecontents*}{data.tex}
01 & 02 & 03 & 04 & 05\\06 & 07 & 08 & 09 & 10\\11 & 12 & 13 & 14 & 15\\16 & 17 & 18 & 19 & 20\\21 & 22 & 23 & 24 & 25
\end{filecontents*}
\begin{document}
\begin{tabular}{c|c|c|c|c}
\input{data.tex}
\end{tabular}
\begin{tabular}{c|c|c|c|c}
01 & 02 & 03 & 04 & 05\\06 & 07 & 08 & 09 & 10\\11 & 12 & 13 & 14 & 15\\16 & 17 & 18 & 19 & 20\\21 & 22 & 23 & 24 & 25
\end{tabular}
\end{document}
The result of the MWE is shown below. The left table is inputted, and the right one is typed directly. Notice how 25 has different alignments in each case.