Created
August 18, 2017 14:34
-
-
Save tardonly/8aaac9c7e1d841099761454d090b89ee to your computer and use it in GitHub Desktop.
Exercise 12 solution
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
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