I am trying to access elements from the nested lists. For example,
file = [[“Name”,”Age”,”Medal”,”Location”],[“Jack”,”31”,”Gold”,”China”],[“Jim”,”29”,”Silver”,”US”]]
This data contains at least 3000 lists. I only want to put the data into a new list with the column Name and “Location”
Output should be: [[“Name”,”Location”],[“Jack”,”China”],[“Jim”,”US”]]
This looks like a data frame. But I cannot use any module to separate the columns. How can I code it using python built-in function and methods. I tried for loops but failed,