Newline (NuBe Question)

Grizzy Adams RealGrizzlyAdams at vivaldi.net
Wed Nov 15 02:25:36 EST 2023


Hi & thanks for patience with what could be simple to you

Have this (from an online "classes" tutorial) 

--- Start Code Snippit  ---

students = []
grades = []
for s in geographyClass:
	students.append(geographyStudent(s))
for s in students:
                grades.append(s.school)
                grades.append(s.name)
                grades.append(s.finalGrade())
                if s.finalGrade()>82:
                        grades.append("Pass")
                else:
                        grades.append("Fail")
print(grades)

--- End Code Snippit  ---

I have extended (from tutorial) it a bit, I would really like to have a newline 

at end of each record, I have searched (and tested) but cant get "\n" to give a 

newline, I get "Mydata\n"

Do I need to replace "append" with "print", or is there a way to get the 
newline in as I append to list?

Thanks again


More information about the Python-list mailing list