This is in Python. I'm trying to figure out exactly how this works so I can translate it to Java.
numInversions = sum(
state.index(START[j]) > state.index(START[i])
for i in range(16) for j in range(i) # each pair (i,j)
) i pretty much understand it, except how the > operator works, the result from it
以上就是How exactly does this work sum()?的详细内容，更多请关注web前端其它相关文章！