TypeError: unsupported operand type(s) for *: ‘range‘ and ‘int‘

This is an error caused by the python2 and python3 versions
in python2, range() returns a list, and you can directly operate range and int
in python3, range() becomes a class. You can’t directly operate on range. You need to add a list first, such as list (range (5))
in order to save memory, range() in python3 only stores the start, stop and step elements of range(), and the rest of the values are calculated one by one, which is actually an iterator. In addition, list() lets range() calculate all the values, and then it can be added.

Read More: