txt = input("Enter some text:") dash = len(txt) * '-' print("+-" + dash + "-+") print("| " + txt +" |") print("+-" + dash + "-+")