Python String Slice Time Complexity Of Kruskals Algorithm