how to get directory path

i am asking how to get the directory path because when i have this in my code 'os.chdir('mainprofile.json')' i get this error
'NotADirectoryError: [Errno 20] Not a directory: 'mainprofile.json''

You are viewing a single comment. View All
Answered by GatewayDuckYT [earned 5 cycles]
View Answer

@GatewayDuckYT how would i add os.chdir() into this? (im kinda new with replit sorry)