I am saving json file from my code using os.mkdir(path) which creates the json folder containing json file, now I want to store only json file to the folder without creating the folder of json containing file, please help me, thanks in advance
cwd=os.getcwd()#current directory
os.chdir(cwd)
#print(cwd)
path=cwd+'/'+json_folder_name
if os.path.isdir(path):
shutil.rmtree(path)
os.mkdir(json_folder_name)
os.mkdiris specifically just for making a folder