Sep-25-2020, 07:29 AM
There are many solutions, knowing that ".index(i)" will give you the first occurence only.
Two suggestions:
1) Start an independent counter incremented in each loop. student[x], will give the different names (2 extra lines)
2) Do a diffenrent kind of loop , like "for i in range(len(grade)):", again student[i] will do the trick. (no extra lines)
Paul
Two suggestions:
1) Start an independent counter incremented in each loop. student[x], will give the different names (2 extra lines)
2) Do a diffenrent kind of loop , like "for i in range(len(grade)):", again student[i] will do the trick. (no extra lines)
Paul
It is more important to do the right thing, than to do the thing right.(P.Drucker)
Better is the enemy of good. (Montesquieu) = French version for 'kiss'.
Better is the enemy of good. (Montesquieu) = French version for 'kiss'.