Python Index Function Time Complexity Of Bubble