ERROR BECAUSE OF CAT COMMAND AND !type filename.txt
1.cat primes.txt
  File "<ipython-input-110-b296f9e207f4>", line 1
    cat primes.txt
             ^
SyntaxError: invalid syntax
2.even !type filename.txt is showing

The system cannot find the file specified.

Python-3.4.3 Loading-Data-From-Files 02-03 min 0-10 sec 14-03-20, 9:24 a.m. mohammedmehataab786@gmail.com

Answers:

In case you are using the cat command in the IPython console, please make sure you are using the magic command %cat instead of only using the command cat Also make sure that the file is located in the current directory to which your IPython console is pointing to. If you are on Windows: you can use !type <file-path>/<filename>.txt Example: !type C:/Documents/myfile.txt
18-04-20, 7:49 p.m. ankitrj.iitb


Click here to reply/comment online