Spoken\r\nTutorial, IIT Bombay
http\r\ns://spoken-tutorial.org
Python\r\n3.4.3
Loading\r\nData From Files -Assignments
Assignment-2
2. Given a file \u201cdata.txt\u201d with three columns of data separated by\r\nspaces. Read it into 3 separate simple
sequences.
Answer \u2013
// sorry, can\u2019t show the\r\nexecution as the file is not available in the download section.
x = loadtxt("C:/Users/Administrator/Desktop/gaurav patni IIT\r\nBombay
...: Tutorials 22 june 2019/data.txt",unpack=True)
print (x)
3. Given a file \u201cdata.txt\u201d with three columns of data separated by \u201c:\u201d.\r\nRead it into 3 separate simple
sequences.
Answer \u2013
// sorry, can\u2019t show the\r\nexecution as the file is not available in the download section.
x = loadtxt("C:/Users/Administrator/Desktop/gaurav patni IIT\r\nBombay
...: Tutorials 22 june 2019/data.txt",unpack=True,\r\ndelimite
...: r=":")
\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n
print (x)
Python-3.4.3 Loading-Data-From-Files 00-01 min 50-60 sec