Commit d07f0445 authored by Lauren Ko's avatar Lauren Ko Committed by Maxim Belkin

03-lists.md: Use `.pop()` instead of `del` for consistency (#686)

parent 5d81290c
......@@ -243,13 +243,15 @@ odds after adding a value: [1, 3, 5, 7, 11]
{: .output}
~~~
del odds[0]
removed_element = odds.pop(0)
print('odds after removing the first element:', odds)
print('removed_element:', removed_element)
~~~
{: .language-python}
~~~
odds after removing the first element: [3, 5, 7, 11]
removed_element: 1
~~~
{: .output}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment