Suppose you have two lists:
x = [Jack, John, Suzie, Bill, James]
y = [93, 88, 100, 72, 82]
I have written a code to average the numbers in y, and remove all numbers below that average. Is there a way to also delete the corresponding names in list x as well?
So, if 88, 72, and 82 were removed from y, how can I use that to remove John, Bill, and James from list x?
Here is a snippet of my current code:
newName = nameList + listName
newGrade = gradeList + listGrade
print(newName)
print(newGrade)
avg = getAverage(newGrade)
print('The average of the list is:', avg)
gradeAvg = [i for i in newGrade if i > avg]
nameAvg =
I have isolated all elements in gradeAvg, and need to take those same ones out from nameAvg.