What are type hints in Python 3.5?

I would suggest reading PEP 483 and PEP 484 and watching this presentation by Guido on type hinting. In a nutshell: Type hinting is literally what the words mean. You hint the type of the object(s) you’re using. Due to the dynamic nature of Python, inferring or checking the type of an object being used is especially hard. This fact makes it hard for developers to understand what … Read more

TypeError: list indices must be integers or slices, not list

This is a classic mistake. i in your case is already an element from array (i.e. another list), not an index of array (not an int), so You can check the Python tutorial. Also, try doing this: And see what you get! Also I would advise to stick to naming conventions: variables are normally lower-case (volume, not Volume). In this case i is misleading. row or elem would be much more suitable.