Last active
September 18, 2020 16:19
-
-
Save timeowilliams/e86a7ac854f1ff34c47e835283997b7c to your computer and use it in GitHub Desktop.
Python Practice 12: First and Last
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
def firstAndLast(a): | |
c =[] | |
c.append(a[0]) | |
c.append(a[-1]) | |
print(c) | |
a = [3, 4, 6, 7, 9] | |
firstAndLast(a) | |
name = ['T', 'i', 'm', 'e', 'o'] | |
firstAndLast(name) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment