Write a function to slice a tuple, given an input tuple and start, stop, step=1


Topic: Write a function to slice a tuple, given an input tuple and start, stop, step=1

Solution

def slice_a_tuple(a_tuple, start, stop, step=1):
    return a_tuple[start:stop:step]



List all Python Programs