1、 AttributeError: 'module' object has no attribute 'randint'
You have anther file named "random.py" on the Python path that is read before the random module is reached.
2、Why does “return list.sort()” return None, not the list?
list.sort
sorts the list in place, i.e. it doesn't return a new list.