Jan-23-2023, 04:34 PM
(Jan-23-2023, 04:21 PM)kafka_trial Wrote: why do I get the following message:total = [] makes a list with no elements. total[0] indexes an element that doesn't exist, thus "index error".
Error:Traceback (most recent call last): File "C:/Users/mustafa.turus/OneDrive - Capital City College Group/Desktop/sirrrrr.py", line 24, in <module> total[i]=history[i]+maths[i] IndexError: list assignment index out of range
Do not use reply unless referring to a previous post. Even then, edit the reply to only include the important parts. Here I only needed to reference the question and the error message, so I removed everything else from the reply. Think of what a mess it would be if I replied to your post, and you replied to mine, and I replied back to yours and the reply part of each post becomes huge, dwarfing the important additional content.