0
Studentnames = [a, b, c]
StudentMarks = [10, 20, 30]

expected output:

Student_names_marks = [a, 10, b, 20, c, 30]
Viper
  • 3
  • 3
  • 1
    Variable names are not allowed to have spaces. further more, I think this solves your question: https://stackoverflow.com/questions/3678869/pythonic-way-to-combine-two-lists-in-an-alternating-fashion – Torxed Jun 16 '20 at 12:02

1 Answers1

0

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

Rishit Dagli
  • 1,000
  • 8
  • 20