Check out example codes for "Try out the enumerate function for yourself in this quick exercise. Complete the skip_elements function to return every other element from the list, this time using the enumerate function to check if an element is on an even position or an odd position.". It will help you in understanding the concepts better.

Code Example 1

def altElement(a):
    return a[::2]

Learn ReactJs, React Native from akashmittal.com