//Edit: If I limit the range to (0, columns - 1) it seems to work perfectly
//Edit2: Is it because the list index starts with 0 (and not with 1)? I guess this is it...
>>> import random
Help on method randint in module random:
randint(self, a, b) method of random.Random instance
Return random integer in range [a, b], including both end points.