Arrays: Difference between revisions
m
→{{header|Python}}: Mention slicing. Poke page to see if SMW syncs.
m (→{{header|Python}}: Python 2 -> Python 3; PEP 8; grammar) |
m (→{{header|Python}}: Mention slicing. Poke page to see if SMW syncs.) |
||
Line 6,785:
# Print the exception.
print(e)
</syntaxhighlight>
Slicing a list creates a new list.
<syntaxhighlight lang="python">
another_array = my_array[1:3]
</syntaxhighlight>
|