this will fix the order
def student(): last_name = getLastname() first_name = getFirstname() gr, g = computeGrade() studlist = [last_name, first_name, gr, g] return studlistNote: Flaten will not be any good if the strings in the list contain more than 1 character as they will also be split into single items in the list.