Studentnames = [a, b, c]
StudentMarks = [10, 20, 30]
expected output:
Student_names_marks = [a, 10, b, 20, c, 30]
Studentnames = [a, b, c]
StudentMarks = [10, 20, 30]
expected output:
Student_names_marks = [a, 10, b, 20, c, 30]
You can simply do something like this-
output = list()
for x, y in zip(Studentnames, StudentMarks):
output.extend([x, y])
The list output
would then have the concatenated version