How can I return a string for the following list:
mark_list1 = ["May", 56, 65, 60, 66, 62]
mark_list2 = ["Jess", 81, 86, 85]
Expected output:
May:56-65-60-66-62
Jess:81-86-85
I have tried doing the following but it I'm stuck since it won't work for all cases:
def get_marks(mark_list):
for x in mark_list:
string = mark_list[0] + ":" + str(mark_list[1])
return string