Using this, we can figure out $\lambda(x)$, for any given $x$ such that $(x,10)=1$
So, $10^{\lambda(x)}≡1\pmod x\implies x\mid(10^{\lambda(x)}-1)$
Let $d$ the smallest positive integer such that $10^d≡1\pmod x$
Also let $\lambda(x)=de+g$ where $0≤g<d$
$a^g=a^{\lambda(x)-de}=a^{\lambda(x)}-(a^d)^e≡1\pmod x$, but $d$ is the smallest positive integer.
So, $g=0\implies d\mid \lambda(x)$, $d$ is called $ord_x{10}$.
Then we need to find out this $d$ .
Let $x\cdot t=10^d-1$ where t is a natural number so, $\frac{1}{x}=\frac{t}{10^d-1}$ and d will be period.
For the divisors of $10$, i.e, $2,5$ the minimum power of $10$ that is divisible by $2^m\cdot 5^n$ is $max(m,n)$ where m,n are non-negative integers.
So, the length of $\frac{1}{2^m\cdot 5^n}$ will be $max(m,n)$.
If $x=2^m\cdot 5^n \cdot Q$ where $(Q,10)=1$,
$\frac{1}{x}$ will have $max(m,n)$ non-recurring digits followed by $d$ recurring digits where d is $ord_x{10}$.