import tkinter as tk

def get_user_input():
    # Create a new Tkinter window
    root = tk.Tk()
    root.title("Input Value")

    # Use a StringVar to store the user's input
    user_value = tk.StringVar()

    # Create a label and an entry widget linked to user_value
    label = tk.Label(root, text="Enter a value:")
    label.pack(padx=10, pady=10)
    entry = tk.Entry(root, textvariable=user_value)
    entry.pack(padx=10, pady=10)

    # Define a callback function for the submit button that will close the window.
    def on_submit():
        # Destroy the window; control will then continue past mainloop.
        root.destroy()

    # Create a Submit button that calls on_submit when clicked
    submit_button = tk.Button(root, text="Submit", command=on_submit)
    submit_button.pack(padx=10, pady=10)

    # Enter the Tkinter event loop.
    root.mainloop()

    # After the window is destroyed, return the value from the entry widget.
    return user_value.get()