Write a Python program which will read data for several students from a text file and create a list of lists to store that data. The data must be read from a text file named “Lab11.txt”. Each line in the text file contains the first name, last name, techid, number of credits earned, and number of quality points earned for a single student. The individual items of data on a line are separated by one or more spaces. You can see sample data in the D2L file “Lab11.txt”.
Lab11.txt looks like:
Max Medium 12345678 58 152
Jane Johnson 87654321 78 201
Bill Bupkiss 23456789 29 29
Nate Newby 98765432 0 0
Harold Humphries 11223344 43 160
Carol Cramer 22334455 102 400
Alvin Adams 33445566 67 120
Fred Frederick 44556677 81 250
Phillip Parker 55667788 44 168
Sam Spade 24681357 16 30
For each line that you read in, you are to split it apart and create a list of the individual items. You should also convert the number of credits and number of quality points to integers within this list. These individual lists are then to be concatenated into a list of lists. For example, the composition of your final data structure should be similar to what is shown below.
Once you get your list constructed, print it so that I can verify that you’ve completed this part. Then go through your list and compute and output the gpa for each student in turn. Remember that gpa is quality points divided by credit hours.
For this lab, you may use any string or list functions or methods that you wish.
I know how to read in the whole file to a list:
myFile = open("Lab11.txt", "r")
myList = list(myfile)
but I am having trouble splitting each line from the file into another list
if i type
it will print the first line
please help with this assignment