Why this snippet:
import tkinter as tk
print(tk.simpledialog.askstring('_', '_'))
produces this error:
AttributeError: module 'tkinter' has no attribute 'simpledialog'
There is a simpledialog
module (https://docs.python.org/3/library/dialog.html#module-tkinter.simpledialog). This code works:
from tkinter import simpledialog
print(simpledialog.askstring('_', '_'))