to add to what gruntfutuk explained - you probably use python2 teaching materials where range will return list. But you are using python3 (good!) so range will return range object - more memory efficient, because it does not create the whole list in memory. from docs:
Quote:The advantage of the range type over a regular list or tuple is that a range object will always take the same (small) amount of memory, no matter the size of the range it represents (as it only stores the start, stop and step values, calculating individual items and subranges as needed).
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs