Created
June 16, 2017 13:23
-
-
Save ashokbharat/9736ed6e8c9ef1e2e98b2684f66c5a3d to your computer and use it in GitHub Desktop.
New List Creation
This file contains 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
a = [5, 10, 15, 20, 25] | |
length = len(a) | |
c=[] | |
def print_new_list(b): | |
c.append(b[0]) | |
c.append(b[length-1]) | |
print_new_list(a) | |
print(c) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment