from tkinter import simpledialog res = simpledialog.askstring('标题',prompt='提示内容',initialvalue='默认值') if(res != None): print(res)