Python Forum

Full Version: [Very Basic Example Only] Hello World
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
try:
    # For Python 2.x
    import Tkinter as tk
except ImportError:
    # For Python 3.x
    import tkinter as tk

app_win = tk.Tk()
app_win.title('Hello World')
app_frame = tk.Frame(app_win)
app_win.mainloop()
I don't understand the app_ prefix. This has (almost) nothing to do with this post... it's used everywhere. Obviously it's your app, why would you need to remind yourself of that. Wouldn't it make more sense, and be easier to read, if the variables were simply "win" and "frame"?
They are just variable names you can name then however you like :) , this is just code by wuf copied from the old forum