Skip to content

Instantly share code, notes, and snippets.

@ashokbharat
Created June 16, 2017 13:23
Show Gist options
  • Save ashokbharat/9736ed6e8c9ef1e2e98b2684f66c5a3d to your computer and use it in GitHub Desktop.
Save ashokbharat/9736ed6e8c9ef1e2e98b2684f66c5a3d to your computer and use it in GitHub Desktop.
New List Creation
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