open a directory folder in python code example
Example 1: how to open folder in python
import webbrowser
path = "C:/Users/Username/PycharmProjects"
webbrowser.open(path) # Opens 'PycharmProjects' folder.
Example 2: how to access a txt file through os library in python
my_file_handle=open("folder/test.txt")
my_file_handle.read()