How can I remove the path and leave only the filename and extension inside a variable?
root=tk.Tk()
root.withdraw()
FileName=filedialog.askopenfilenames()
print(Filename)
I want only for example namefile.txt
and not the whole path, like /path/to/namefile.txt
.