Python: Slice Notation on Tuple
Introduction The term slicing in programming usually refers to obtaining a substring, sub-tuple, or sublist from a string, tuple, or list respectively. Python offers an array of straightforward ways to slice not only these three but any iterable. An iterable is, as the name suggests, any object that can be iterated over. In this article, we’ll go over everything you need to know about Slicing Tuples in Python. Slicing a Tuple in Python There are a couple of ways to […]
Read more