Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

Define a function shiftRight which receives a list as input, and returns a list with all the elements shifted to the right

values = [2, 3, 5, 7, 11, 13]

def shift(list):
    new_list = []

    for i in list:
        new_list.insert(len(new_list)-1, i)

    return new_list
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Define #function #shiftRight #receives #list #returns #list #elements #shifted
ADD COMMENT
Topic
Name
3+9 =