Update perlin.py

Got "TypeError: 'range' object does not support item assignment" in python3. Apparently range() now returns an iterator, not a sequence. This fixes it to work on python 2.x and 3.x.
Merge pull request #3 from psi29a/master

Works in python3 now. :)