Python 3.4 compatibility

range() doesn't return a list so had to wrap it in list()