Is any Python type whose objects contain elements that are numbered called a sequence type? -
i've been confused question long time. python type objects contain elements numbered called sequence type?
sequences in python containers (i.e. have __contains__ method), iterable (i.e. have __iter__ method) , sized (i.e. have __len__ method). have following methods:
__getitem__ __reversed__ index count these basic immutable sequences, mutable they'll have following methods:
__setitem__ __delitem__ insert append reverse extend pop remove __iadd__
Comments
Post a Comment