Tkinter window closes automatically after Python program has run in PyCharm
Start a event loop after setting up widgets, event handlers.
# input('Press <Enter> to end the program') # (X)window.mainloop() # OR mainloop()
Remove the call to the input
.