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

Relative imports in Python 3

unfortunately, this module needs to be inside the package, and it also needs to be runnable as a script, sometimes. Any idea how I could achieve that? It’s quite common to have a layout like this… …with a mymodule.py like this… …a myothermodule.py like this… …and a main.py like this… …which works fine when you … 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.

tech