traceback (most recent call last)file "motorcycles py"line in print(motorcycles[ ]indexerrorlist index out of range python attempts to give you the item at index but when it searches the listno item in motorcycles has an index of because of the off-by-one nature of indexing in liststhis error is typical people think the third item is item number because they start counting at but in python the third item is number because it starts indexing at an index error means python can' figure out the index you requested if an index error occurs in your programtry adjusting the index you're asking for by one then run the program again to see if the results are correct keep in mind that whenever you want to access the last item in list you use the index - this will always workeven if your list has changed size since the last time you accessed itmotorcycles ['honda''yamaha''suzuki'print(motorcycles[- ]the index - always returns the last item in listin this case the value 'suzuki''suzukithe only time this approach will cause an error is when you request the last item from an empty listmotorcycles [print(motorcycles[- ]no items are in motorcyclesso python returns another index errortraceback (most recent call last)file "motorcyles py"line in print(motorcycles[- ]indexerrorlist index out of range note if an index error occurs and you can' figure out how to resolve ittry printing your list or just printing the length of your list your list might look much different than you thought it didespecially if it has been managed dynamically by your program seeing the actual listor the exact number of items in your listcan help you sort out such logical errors introducing lists