Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from random import *
- from tkinter import *
- window = Tk()
- window.geometry("300x200")
- number = "123456789"
- new_string = "qwertyuiopasdfghjklzxcvbnm"
- up_string = new_string.upper()
- passw = number+new_string+up_string
- List = list(passw)
- shuffle(List)
- user_passw = ''.join([choice(List) for x in range(8)])
- def hello():
- print(user_passw)
- button = Button(window, text="Click me", command=hello)
- label = Label(window)
- label.config(text='Enter Text', font='Arial 25', fg='gray')
- label.pack(padx=50, pady=20)
- button = Button(window, text="Click me", command=hello)
- button.config(text="Click me", bg='black', fg='red', font="Arial 15",width=20, height=5)
- button.pack()
- window.mainloop()
Add Comment
Please, Sign In to add comment