I have used both ‘/’ and ‘//’ but neither works. This seems to be the problem despite the file being present in the folder!
`
FileNotFoundError Traceback (most recent call last)
Cell In[60], line 1
----> 1 with open('Desktop//extra//Hello.txt','r') as f:
2 content =f.read
3 print(content)
`
`File ~anaconda3Libsite-packagesIPythoncoreinteractiveshell.py:324, in _modified_open(file, *args, **kwargs)
317 if file in {0, 1, 2}:
318 raise ValueError(
319 f"IPython won't let you open fd={file} by default "
320 "as it is likely to crash IPython. If you know what you are doing, "
321 "you can use builtins' open."
322 )
--> 324 return io_open(file, *args, **kwargs)`
`FileNotFoundError: [Errno 2] No such file or directory: 'Desktop//extra//Hello.txt'``
New contributor
Kartikeya is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
2