PCP Anaconda: I want to call a text file. But where do I save the file?

So
1

I'm using Jupyter notebook on the web browser. Now I want to call a text file (txt). Where do I save the file?

When I insert my folder with the file under User / Anaconda3 and file via

with open ("./data/file.txt", "r") as file:

does not work! There's always a FileNotFoundError.

What can I do? Is the file possibly in the wrong folder?

Le

You certainly mean Python, not PHP.

Specify the absolute path for the file, rather than the relative path. Whether Anaconda provides a value for the case, which provides the path to the root directory, I do not know, you should look into the https://docs.anaconda.com/. Then you could work more flexibly by concatenating the application path and the relative path.