Thank you for the prompt reply.
But when I enter this in:
sorry did not see your second post Yoriz.
That piece of code is much easier to understand and it works... but it prompts me for my mark before asking for my last name and first name.... how do i make it so the order asks for last name and first name then mark and gives grade?
But when I enter this in:
from itertools import chain my_list = [student()] def flatten(listOfLists): return chain.from_iterable(listOfLists) my_flattened_list = list(flatten(my_list)) print(my_flattened_list)It returns -->['lastname', 'firstname', (mark, 'letter grade)]
sorry did not see your second post Yoriz.
That piece of code is much easier to understand and it works... but it prompts me for my mark before asking for my last name and first name.... how do i make it so the order asks for last name and first name then mark and gives grade?
def student(): #studlist = [getLastname(), getFirstname(), getMark(), computeGrade()] gr, g = computeGrade() studlist = [getLastname(), getFirstname(), gr, g] return studlistreturns the proper list that i was after! but need the correct order of question.