Python 3 fixes

* list and range
* raw_input -> input