python open folder

import subprocess
subprocess.Popen(r'explorer /select,"C:\path\of\folder\file"')

Here is what the above code is Doing:
1. It’s creating a subprocess.Popen object.
2. It’s passing the string “explorer /select,C:\path\of\folder\file” to the subprocess.Popen object.
3. It’s calling the subprocess.Popen object.

The subprocess.Popen object is a subprocess that is created by the subprocess module. The subprocess.Popen object is used to run a process in the background. The subprocess.Popen object is passed a string that contains the path of the file that you want to open. The subprocess.Popen object will open the file in the background.