SyntaxFix
Write A Post
Hire A Developer
Questions
The following two snippets are semantically equivalent:
for item in iterator: a_list.append(item)
and
a_list.extend(iterator)
The latter may be faster as the loop is implemented in C.