efficiency of python' sequence types in the previous sectionwe began to explore the underpinnings of python' list classin terms of implementation strategies and efficiency we continue in this section by examining the performance of all of python' sequence types python' list and tuple classes the nonmutating behaviors of the list class are precisely those that are supported by the tuple class we note that tuples are typically more memory efficient than lists because they are immutablethereforethere is no need for an underlying dynamic array with surplus capacity we summarize the asymptotic efficiency of the nonmutating behaviors of the list and tuple classes in table an explanation of this analysis follows operation len(datadata[jdata count(valuedata index(valuevalue in data data =data (similarly !=>=data[ :kdata data data running time ( ( (no( ( ( ( ( (cntable asymptotic performance of the nonmutating behaviors of the list and tuple classes identifiers datadata and data designate instances of the list or tuple classand nn and their respective lengths for the containment check and index methodk represents the index of the leftmost occurrence (with if there is no occurrencefor comparisons between two sequenceswe let denote the leftmost index at which they disagree or else min( constant-time operations the length of an instance is returned in constant time because an instance explicitly maintains such state information the constant-time efficiency of syntax data[jis assured by the underlying access into an array