SyntaxFix
Write A Post
Hire A Developer
Questions
I ended here, because I googled for "python first and last element of array", and found everything else but this. So here's the answer to the title question:
a = [1,2,3] a[0] # first element (returns 1) a[-1] # last element (returns 3)