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 cList.append((cStr,cID)) sortedCList = cList.sort() for c in range(len(sortedCList)): cID = sortedCList[c] cStr = sortedCList[c]
But I get the error:
TypeError: object of type 'NoneType' has no len()