I don't know how it is an unmatched )
from tkinter import * from tkinter import filedialog def openFile(): filepath = filedialog.askopenfile() file = open(filepath), ‘r’) print(file.read()) file.close() window = Tk() button = Button(text="Open",command=openFile) button.pack() window.mainloop() C:\Users\Hp\PycharmProjects\pythonProject\venv\Scripts\python.exe "C:\Users\Hp\PycharmProjects\pythonProject\open a file.py" File "C:\Users\Hp\PycharmProjects\pythonProject\open a file.py", line 7 file = open(filepath), ‘r’) ^ SyntaxError: unmatched ‘)’ Process finished with exit code 1 >Solution : From the… Read More I don't know how it is an unmatched )