SyntaxFix
Write A Post
Hire A Developer
Questions
you should use this
del record[-1]
The problem with
record = record[:-1]
Is that it makes a copy of the list every time you remove an item, so isn't very efficient