While trying to solve some python exercices I found myself needing to split a string using the .split with 2 delimiters but i cant make it work. I've searched in other people's questions but the answer is always to use the re.split which i cant use because these are exerceices for class in which i can't use it.
this is my code:
f1=open("data/namesStudents.txt")
f2=open("data/namesGrades.txt")
text=f1.read().split()
text2=f2.read().split("\n")
text2
To put this in context this is an exercice in which i have to get the grades of students off a txt file(they are like this basicly :14 15 14 17\n 14 14\n\n 13 10\n 13 10 11) and then make the average of the grades of each student and add it to the other txt file.