Created
April 21, 2020 00:10
-
-
Save roman-on/f58de7b4979a25bcf298c286fcc713b8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
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