I have 2 lists: list1
and list2
list1
is a list in list and contains various strings
list2
is also a list in list and consists of different integer values
the dimensions of both lists is the same
how do I multiply each string in list1
with each integer in list2
in order to achieve something like that:
list1 = [['ABC','DEF'],['GHI','JKL'],['MNO','PQR']]
list2 = [[2, 2], [3, 3], [4, 4]]result = [['ABC', 'ABC', 'DEF', 'DEF'], ['GHI', 'GHI', 'GHI', 'JKL', 'JKL', 'JKL'], ...]
Thank you very much
I already tried the zip() function and worked with the * operator but nothing worked