ch02: created notebook
This commit is contained in:
11
02-array-seq/slice-assign.rst
Normal file
11
02-array-seq/slice-assign.rst
Normal file
@@ -0,0 +1,11 @@
|
||||
Assigning to Slices
|
||||
===================
|
||||
|
||||
An example that raises an error::
|
||||
|
||||
>>> l = list(range(10))
|
||||
>>> l[2:5] = 100
|
||||
Traceback (most recent call last):
|
||||
...
|
||||
TypeError: can only assign an iterable
|
||||
|
||||
Reference in New Issue
Block a user