Created
April 21, 2020 00:14
-
-
Save roman-on/a6042f7a5436b677b707e1008a2bf665 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
""" | |
The function accepts two lists list_y, list_x. The function extends list_x (modifies it) so that at the beginning | |
it also contains list_y, and returns list_x. | |
x = [4, 5, 6] | |
y = [1, 2, 3] | |
extend_list_x(x, y) | |
[1, 2, 3, 4, 5, 6] | |
""" | |
def extend_list_x(list_x, list_y): | |
a = list_x | |
b = list_y | |
y = [b[0], b[1], b[2], a[0], a[1], a[2]] | |
return (y) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment