Skip to content

Instantly share code, notes, and snippets.

@dyerrington
Last active October 21, 2024 22:03
Show Gist options
  • Save dyerrington/14f262fd54eaaeb2dce82c081e461c31 to your computer and use it in GitHub Desktop.
Save dyerrington/14f262fd54eaaeb2dce82c081e461c31 to your computer and use it in GitHub Desktop.
Efficient List Creation in Python: Comparing .append(), +=, List Comprehension, and Duplication Description: This notebook explores different approaches to creating and modifying lists in Python, comparing the efficiency of methods like .append(), +=, list comprehension, and list duplication ([0] * n). Includes insights on performance and trade-…
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment