Subscribe to my free python newsletter: https://pythonkoans.substack.com
pythonkoans.substack.com/p/koan-4-the...
pythonkoans.substack.com/p/koan-4-the...
- reversed(list) is more memory efficient for reversing a list than slicing list[::-1] because it returns an iterator instead of a copy
- You can remove multiple items with slice assignment using list[1:4] = [] or del a[1:4]
- reversed(list) is more memory efficient for reversing a list than slicing list[::-1] because it returns an iterator instead of a copy
- You can remove multiple items with slice assignment using list[1:4] = [] or del a[1:4]
A scope determines where a variable name is visible, and it’s lifetime.
Python checks for the variable definition in the following order, and stops at the first match
A scope determines where a variable name is visible, and it’s lifetime.
Python checks for the variable definition in the following order, and stops at the first match
If you have suggestions or topics you want me to cover, feel free to DM me!
#python
pythonkoans.substack.com
If you have suggestions or topics you want me to cover, feel free to DM me!
#python
pythonkoans.substack.com