Complexity Of Sort Function In Python