SyntaxFix
Write A Post
Hire A Developer
Questions
lst = ['a', 'b', 'c', 'd', 'e', 'f', 'g']; lst = lst[0:2] + lst[6:]
This is a single step operation. It does not use a loop and therefore executes fast. It uses list slicing.