Guest User

Untitled

a guest
Nov 5th, 2018
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. from random import *
  2. from tkinter import *
  3.  
  4. window = Tk()
  5. window.geometry("300x200")
  6.  
  7. number = "123456789"
  8. new_string = "qwertyuiopasdfghjklzxcvbnm"
  9. up_string = new_string.upper()
  10. passw = number+new_string+up_string
  11. List = list(passw)
  12. shuffle(List)
  13.  
  14. user_passw = ''.join([choice(List) for x in range(8)])
  15.  
  16. def hello():
  17. print(user_passw)
  18. button = Button(window, text="Click me", command=hello)
  19.  
  20.  
  21. label = Label(window)
  22. label.config(text='Enter Text', font='Arial 25', fg='gray')
  23. label.pack(padx=50, pady=20)
  24.  
  25. button = Button(window, text="Click me", command=hello)
  26. button.config(text="Click me", bg='black', fg='red', font="Arial 15",width=20, height=5)
  27.  
  28. button.pack()
  29. window.mainloop()
Add Comment
Please, Sign In to add comment