On Sep 20, 2:20 pm, Andrew <aet...@gmail.c omwrote:
What else would you expect to happen?
please explain this behavior to a newb:
>
[1, 2, 3, 4]
>
['a', 'b', 'c', 'd']
>
[1, 2]
[1, 2, 3, 4]
['c', 'd']
['a', 'b', 3, 4]
['a', 'b', 3, 4]
>
>a = [1,2,3,4]
>b = ["a","b","c" ,"d"]
>a
>b = ["a","b","c" ,"d"]
>a
>b
['a', 'b', 'c', 'd']
>
>a[0:2]
>a
>b[2:4]
>a[0:2] = b[0:2]
>b[2:4] = a[2:4]
>a
>b[2:4] = a[2:4]
>a
>b