<1>
In the below code chunk from reading files section of python-
with open("/cxldata/python_sample_file") as f:
s = “”
for line in f:
print(line)
s = s + line
print(s)
I want to understand the path “/cxldata/python_sample_file”. How to access this path?
PS: Even in Linux Tutorial, the similar path was used to check big.txt file using cat /cxldata/big.txt. I could not find this path when I am using ls in my root directory. Please suggest
<2> While I am using the similar code, I have to use “/home/…/mbox.txt” instead of “/mbox.txt” directly in the open statement otherwise it throws an File Not Found error, whereas you have used the “/cxldata/python_sample_file” directly.
with open("/home/niteshjindal20105879/cloudxlab_jupyter_notebooks/mbox.txt") as f:
for line in f:
print(line)
Please provide clarity on the above-stated paths.