defining directory in python code example
Example 1: create directory in python
import os
directory = "Krishna"
path_dir = "C:/Users/../Desktop/current_dir/"
if not os.path.exists(directory):
os.mkdir(os.path.join(path_dir, directory))
Example 2: which folder python os
import os
cwd = os.getcwd()