I need to multiply these two lists together but one is very long and the other is very short, the long list's length is a multiple of the short one's length. How can I multiply them in a way that the short one is repeated until all of the elements in the long list have been multiplied by it.
For example:
longList = [10, 10, 10, 10, 10, 10, 10, 10, 10]
shortList = [1, 2, 3]
What I am trying to do:
longList * shortList # Something like this
Desired output
[10, 20, 30, 10, 20, 30, 10, 20, 30]
*This is not a duplicate of How to zip two differently sized lists? because I am not looking to zip them, but rather to multiply them.