Skip to content

Instantly share code, notes, and snippets.

@tardonly
Created August 18, 2017 14:34
Show Gist options
  • Save tardonly/8aaac9c7e1d841099761454d090b89ee to your computer and use it in GitHub Desktop.
Save tardonly/8aaac9c7e1d841099761454d090b89ee to your computer and use it in GitHub Desktop.
Exercise 12 solution
a=raw_input('enter list:')
a=eval(a)
if len(a)<=1:
print([a[0]])
else:
print([a[0],a[len(a)-1]])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment