I launch my py file from C:\Users\UserDirectory\OneDrive\Bureau\python. But when I want to load a file saved in python directory with the open() method, so in the same directory that my py file, python return the FileNotFoundError.
For example:
filename = 'test.txt'
with open(filename, 'r') as f:
lines = f.read()
I guess it's very simple problem to resolve but I could'nt by myself. I noticed that when I use write(), it saves file in C:\Users\UserDirectory. thanks for help