I'm a student who is recently been studying the basics of Python. So I faced this problem while doing one of my projects. If someone could explain a solution that is not too complex for my stage I would be grateful.
students = ['Sam', 'Ben', 'John', 'Michael']
marks = [27, 68, 34, 21]
print('Student Name - Mark')
for n in range(0, len(marks)):
print(students[n], marks[n])
gives the result
Student Name - Mark
Sam 27
Ben 68
John 34
Michael 21
To make it look nicer, I need to take this second list of members which are the marks in a straight vertical line. the expected result is:
Student Name - Mark
Sam 27
Ben 68
John 34
Michael 21
P.S. I was unable to find an answer through google.