Python Math – TypeError: ‘NoneType’ object is not subscriptable
lista = list.sort(lista) This should be lista.sort() The .sort() method is in-place, and returns None. If you want something not in-place, which returns a value, you could use sorted_list = sorted(lista) Aside #1: please don’t call your lists list. That clobbers the builtin list type. Aside #2: I’m not sure what this line is meant … Read more