SyntaxFix
Write A Post
Hire A Developer
Questions
For just reading the last element of a slice:
sl[len(sl)-1]
For removing it:
sl = sl[:len(sl)-1]
See this page about slice tricks