No, take it again! Don't give up! Also, don't think that because you are taking it a second time that the exams will be easy because you've seen the material before. The professor could rewrite the exams next semester. But, in any case do your best.
If your university offers a supplementary information session, find out when it is and go to regularly if it improves your programming ability, and if tutoring is available then again make better use of your resources. Programming is not something that you can understand just by reading the material on two dimensional lists.
Think about what can you do with that 2D list? You could link student IDs with GPAs.
How will you program a 2D list?
and how will you display the 2D list, expand it, and destroy it?
The two most valuable coding techniques which were not taught to me when I studied computer science
is that you can 1) comment out lines of code to figure out how it's misbehaving, and 2) adding print statements in decisionary code like "if statements" lets you know what your program is actually doing behind the scenes. That's how I fix my huge programs when I want to throw my computer out the window. Note that commenting-out lines of code basically means this:
# x = y / z # This line has been commented out.
maybe the above code was not working because "z" is a string or zero.
so it looks like x printed this time with no errors, therefore the line of code that I commented-out was the issue.
Also, not sure this is healthy (it's not), but I didn't go to sleep until my program worked, and that's how I got A's!