from random import randint

tupla = tuple(randint(i + 1, 9) for i in range(randint(1, 5)))
print(tupla)

#https://pt.stackoverflow.com/q/389923/101