GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — copy() under lists are mutable · python043/learn-python3@0d199a8

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • notebooks/beginner/notebooks
    • lists.ipynb
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎notebooks/beginner/notebooks/lists.ipynb‎

Copy file name to clipboardExpand all lines: notebooks/beginner/notebooks/lists.ipynb
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,8 @@
141141
"source": [
142142
"original = [1, 2, 3]\n",
143143
"modified = list(original) # Note list() \n",
144+
"# Alternatively, you can use copy method\n",
145+
"# modified = original.copy()\n",
144146
"modified[0] = 99\n",
145147
"print('original: {}, modified: {}'.format(original, modified))"
146148
]
@@ -308,7 +310,7 @@
308310
"name": "python",
309311
"nbconvert_exporter": "python",
310312
"pygments_lexer": "ipython3",
311-
"version": "3.5.4"
313+
"version": "3.6.4"
312314
}
313315
},
314316
"nbformat": 4,

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.