If I take the $k \in \mathbb{N}$ power of 10 and mod it by a large prime, I notice that the remainders repeat at some point.
For instance $10^k mod~7$ seems to repeat every $8$th value of $k$.
Given $k$ (the power of ten), and a large prime number $p$, how can I compute the size of the cycle?
I tried writing a python script that computes the first instance of a repeat. However, I don't know if this works since a single instance of a repeat may not necessarily mean a full cycle.