How do you get random numbers within a range that doesn't include the current integer?

Hello,
I have a problem that I need to solve. What I want to happen is a random integer to be chosen within a range that isn’t a certain integer. For example: Random Integer within 0 - 20 that is not 18. I’m not sure how to tackle this one.

Thank you.

Pick a random number from range 0 to 20, and if it’s 18, then pick another one.

Or

pick a randomly between a 2 random generators that have respectively a range of 0-17 and 19-20 with a respective probability of 18/20 and 2/20

Found my answer.

Have a good day.