It's easier to compute the probability of the opposite event, namely that you get four _different_ digits.
Imagine that you choose the digits one by one by rolling a singe ten-sided die. You win if some digit appears twice. What is the chance of _losing_? In order to lose, all of the following must be true:
* The first digit is some digit.
* The second digit is different from the first digit, which happens with probability 9/10.
* The third digit is different from the two first ones. They are already known to be different, so this happens with probability 8/10.
* The fourth digit is different from the tree first ones, which happens with probability 7/10.
So the probability of losing is $\frac{9}{10}\cdot\frac{8}{10}\cdot\frac{7}{10}=\frac{9\cdot 8\cdot 7}{1000} = 0.504$
The chance of winning is one minus this.