I would like to print the right strings from a list I have, while looping through another list I have.
My two lists look like this:
overview_list = ['1','2','3']
my_list = ['name1', 'year1', 'date1', 'numbre1',
'name2', 'year2', 'date2', 'numbre2',
'name3','year3','date3', 'numbre3']
I would like to loop through the overview_list and for every string I would like to print() the corresponding strings from my_list.
These are:
for '1' from overview_list it sould be printed: 'name1', 'year1', 'date1', 'numbre1'
for '2' from overview_list it should be printed: 'name2', 'year2', 'date2', 'numbre2'
and so on....
I think this could be done with a nested loop, but I am still a beginner in Python and do not know how. Thank you very much for your help!