l = ["a","1","b","2","c","3",]
I'm trying to print the items in the list above simultaneously. with different text added before every nth element. that is, "alphabet" before 0,2,4 elements and "number" before 1,3,5 elements.
expected output is :
- alphabet a
- number 1
- alphabet b
- number 2
- alphabet c
- number 3'''
what I tried is :
a lot of google searching and applying solutions.learning about print(*l, sep="\n")
and how that doesn't help with formatting the output before printing. I tried enumerate
but that's really tough to grasp, I tried in "middle_index" code and split the list into two by "step::2" and then print twice etc. it is not working..please let me know how this can be done. thank you.