https://mefiz.com/ # For Developer import random n = random.sample(range(1,51214), 5) listToString = ''.join([str(elem) for elem in n]) print(n) print(listToString)