Here is the final code on the Ultimate Roulette picker if anyone is interested
![Dance Dance](https://python-forum.io/images/smilies/eusa_dance.gif)
Python is a great language. with the stuff I just learned I will make an automatic dice roller :)
import random as rnd import sys from PyQt5.QtWidgets import (QMainWindow, QApplication, QWidget, QPushButton, QGridLayout, QLabel, QLineEdit, QListWidget, QMessageBox) class Window(QMainWindow): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) # Container container = QGridLayout() label = QLabel('Ultimate Roulette') label2 = QLabel('Side Bets and More') button = QPushButton('Spin') button2 = QPushButton('clear') button.clicked.connect(lambda: self.odd_even()) button2.clicked.connect(self.clear) spinbtn = QPushButton('Numbers') spinbtn.clicked.connect(lambda: self.numpick()) self.listbox = QListWidget() container.addWidget(label, 0, 0, 1, 1) container.addWidget(label2, 0, 1, 1, 1) container.addWidget(button, 1, 0, 1, 1) container.addWidget(button2, 1, 1, 1, 2) container.addWidget(self.listbox, 2, 0 ,1 ,2) container.addWidget(spinbtn, 4, 0, 1, 2) widget = QWidget() widget.setLayout(container) self.setCentralWidget(widget) def odd_even(self): for i in range(1): self.listbox.addItem(f"{rnd.choice(('odd,', 'even,'))} {rnd.choice(('red,', 'black,'))} {rnd.choice(('1st,', '2nd,', '3rd,'))} {rnd.choice(('top 1/2', 'Bottom 1/2'))}") #self.listbox.addItem(f"{rnd.choice(('1st', '2nd', '3rd'))}") #self.listbox.addItem(f"{rnd.choice(('top 1/2', 'Bottom 1/2'))}") def numpick(self): spots = 3 picks = [] while len(picks) < spots: pick = rnd.randint(0, 37) if pick not in picks: picks.append(f'{pick}') nums = ', '.join(picks) self.listbox.addItem(nums) def clear(self): self.listbox.clear() def main(): app = QApplication(sys.argv) window = Window() window.show() sys.exit(app.exec_()) main()
![Dance Dance](https://python-forum.io/images/smilies/eusa_dance.gif)
Python is a great language. with the stuff I just learned I will make an automatic dice roller :)