Skip to content

Commit 8fdcc8a

Browse files
committed
python 3.2
1 parent 6610a87 commit 8fdcc8a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

loops.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,10 @@ Or if we just want to clear a list, we can use the `clear`
273273
>>>
274274
```
275275

276+
If you're using Python 3.2 or older you need to use `stuff[:]` instead
277+
of `stuff.copy()` and `stuff[:] = []` instead of `stuff.clear()`.
278+
`stuff[:]` is a slice of the whole list, just like `stuff[0:]`.
279+
276280
## Exercises
277281

278282
1. Back in "Using if, else and elif" we created a program that asked

0 commit comments

Comments
 (0)