Halite Home

Unable to iterate a list


I have created a list of tuples containing, which I have sorted. The tuples contain (str of cardinal piece, id of cardinal piece) and when I am done I would like to iterate this list.

    for d in CARDINALS:
        cID = gameMap.getSite(Location(x,y), d).owner
        cStr = gameMap.getSite(Location(x,y), d).strength

    sortedCList = cList.sort()

    for c in range(len(sortedCList)):
        cID = sortedCList[c][0]
        cStr = sortedCList[c][1]

But I get the error:
TypeError: object of type 'NoneType' has no len()


I mixed up list.sort and sorted(list). My bad.