with open("classA.csv" , "a", newline = "") as fp:
a = csv.writer(fp, delimiter = ",")
data = [("{0} has scored: {1} / 10\n ".format(name,score))]
a.writerows(data)
I am trying to create a maths quiz that calculates the final result and then writes this result to an excel file. This is my code so far but when I look into excel, I see that the entire statement in data is stretched out across the row and would like this:
| B | o | b | h | a | s | s | c | o | r | e | d | : | 9 | / | 1 | 0
How would I be able to print out like this:
| Bob has scored: | 9/10 |
Thanks for any help!