saving . . . saved I used !type it works in place on cat and loadtxt but do not able to print (primes) please help has been deleted. I used !type it works in place on cat and loadtxt but do not able to print (primes) please help has been hidden .
I used !type it works in place on cat and loadtxt but do not able to print (primes) please help
Title
Question
In [3]: ! type C:\Users\91877\Downloads\primes.txt 
2
11 
13 
17 
19 
23 
29 
31 
37 
41 
43 
47 
53 
59 
61 
67 
71 
73 
79 
83 
89 
97
 In [4]: primes = !type("C:\Users\91877\Downloads\primes.txt")
 In [5]: print(primes) 
['The filename, directory name, or volume label syntax is incorrect.']

Python-3.4.3 Loading-Data-From-Files 02-03 min 50-60 sec 26-05-21, 3:06 p.m. khandelwal35051

Answers:

Please keep the file in the current working directory and try the !type command. To check the current working directory from python type %pwd.
24-06-21, 4:23 p.m. aditya94palaparthy@gmail.com


Log-in to answer to this question.