I have this code that generates two lists. One list goes from 1-30
and the other goes from 30-1
. How can divide each element of some_list2
by each element of some_list
. It would be something like this: 1/30
, 2/29
, an so on. I was thinking about storing each division value in a new list -- one division, one new element.
Here is what I have:
some_list = []
some_list2 = []
for i in reversed(range(1, 31)):
a = i
some_list.append(a)
for x in range(1,31):
b = x
some_list2.append(b)
I tried dividing one list by another as a whole, and I looked at a separate for loop for division, but I am stuck. I am doing this for practice by the way.