The way I create a random digit (0-9) that isn’t the same as the previous digit is (I think) in my digit span demo.
thisNumber = (thisNumber + randint(1,10))%10