ok that works great, I updated it a bit and almost got it perfect.
import random as rnd import sys from PyQt5.QtWidgets import (QMainWindow, QApplication, QWidget, QPushButton, QGridLayout, QLabel, QLineEdit, QListWidget) class Window(QMainWindow): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) # Container container = QGridLayout() label = QLabel('How many Numbers') label2 = QLabel('How many Spots') entry = QLineEdit() entry.setPlaceholderText('picks') entry.setStyleSheet('border: 1px solid black;') entry2 = QLineEdit() entry2.setPlaceholderText('picks') entry2.setStyleSheet('border: 1px solid black;') button = QPushButton('Generate') button.clicked.connect(lambda: self.picker(entry)) self.listbox = QListWidget() container.addWidget(label, 0, 0, 1, 1) container.addWidget(entry, 0, 1, 1, 1) container.addWidget(button, 2, 0, 1, 2) container.addWidget(label2, 1, 0, 1, 1) container.addWidget(entry2, 1, 1, 1, 1) container.addWidget(self.listbox, 3, 0, 1, 2) widget = QWidget() widget.setLayout(container) self.setCentralWidget(widget) def picker(self, spots): spots = int(spots.text()) picks = [] while len(picks) < spots: pick = rnd.randint(1, 49) if pick not in picks: picks.append(f'{pick}') nums = ', '.join(picks) self.listbox.addItem(nums) def main(): app = QApplication(sys.argv) window = Window() window.show() sys.exit(app.exec_()) main()now I am working on replacing the 49 in the for while loop with a second variable. if you could do this easily it would be appreciated. The program is almost complete and functioning the way I would like you did a great job helping just need it to pick a variable amount of numbers from a variable amount of numbers. so example 10 from 80 or 4 from 80 and of course 6 from 49, the common lotteries I will be using it for. thanks again for all the help. I only have Arduino programming experience so python is exciting.