Skipping every other element after the first [duplicate]

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

Leave a Comment