Advertisement
here2share

# Tk_chr_per_sec.py

Sep 6th, 2021
1,364
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.38 KB | None | 0 0
  1. # Tk_chr_per_sec.py
  2.  
  3. from tkinter import *
  4. import random
  5. theList = ['a', 'b', 'c', 'd', 'e']
  6. windows = Tk()
  7. windows.geometry("40x40")
  8. a = StringVar()
  9. a.set(' ')
  10. label = Label(windows, textvariable=a, width=1)
  11. label.pack()
  12.  
  13. while 1:
  14.     random.shuffle(theList)
  15.     for i in range(6):
  16.         windows.after(1000)
  17.         a.set((theList+['-'])[i].upper())
  18.         windows.update()
  19. windows.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement