import random def main(): rand = list(range(1, 50)) random.shuffle(rand) for i in range(0, 49, 6): sel = sorted(rand[i:i + 6]) print(sel) if __name__ == '__main__': main()