For a simulation scenario I'm generating 2 random lists.
For example:
my_list_1 = [17, 4, 22, 10, 18, 19, 23, 12]
my_list_2 = [82]
Just double checked the type of my_list_2 and the result is <class 'list'>
I need to create a new_list_3 with the result of 82*17, 82*4, 82*22, etc.
I've tried this way:
result_list_3 = []
for i in (my_list):
result_list_3.append(i * my_list_2)
And I'm getting the error:
TypeError: can't multiply sequence by non-int of type 'list'
Then I made a dictionary and a pd.DataFrame to try the following:
df['result_list_3'] = df['my_list_1'] * df['my_list_2']
...and I get an giant list of integers, which obviously is not the result I'm looking for.