Skip to content

Instantly share code, notes, and snippets.

@roman-on
Created April 21, 2020 00:10
Show Gist options
  • Save roman-on/f58de7b4979a25bcf298c286fcc713b8 to your computer and use it in GitHub Desktop.
Save roman-on/f58de7b4979a25bcf298c286fcc713b8 to your computer and use it in GitHub Desktop.
"""
Write a function called shift_left. The function accepts a list of 3 lengths and returns a new list one step to the left.
>>> shift_left([0, 1, 2])
[1, 2, 0]
>>> shift_left(['monkey', 2.0, 1])
[2.0, 1, 'monkey']
"""
def shift_left(my_list):
print ([my_list [1], my_list [2], my_list [0]])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment