# val_list is read from input. shift_left() has one parameter list_to_modify, and shifts list_to_modify left.
#Call shift_left() with a copy of the list val_list as the arguement to avoid modifying val_list
def shift_left(list_to_modify):
index = 0
temp = list_to_modify[0]
while index < len(list_to_modify) - 1:
list_to_modify[index] = list_to_modify[index + 1]
index += 1
list_to_modify[len(list_to_modify) - 1] = temp
print (f'Shifted left: {list_to_modify}')
val_list = input().split()
copy_list = val_list[:]
shift_left(copy_list)
print(f'Original: {val_list}')
# shift_left takse in one list argument. Lists are mutable, so to call shift_left()
# without changing the values of the original list, val_list[:] is used to pass a copy of the list as the argument.
To embed this project on your website, copy the following code and paste it into your website's HTML: