I'm not too sure how to ask this, and I'm not all that experienced with programming, so you'll have to forgive me. Anyways, I have an issue. Basically, I need to come up with the sum of some numbers and also the average.
The program is supposed to have the user inputs values. They input a month and a number associated with that month, and then I need to get the average. So I have one big list, and then lists within that list. It basically looks like this:
months = [["January", 3.45], ["February", 7.1865], ["March", 4.56]]
What I'm wondering is, how do I single out the second element in each list? I was thinking that I could use a for loop and compiling the numbers into a separate list, but I tried that and I couldn't it to calculate correctly.