Σ.Μ. Κεφ8 a[0] = a[1]
Τι θα εμφανίσουν οι λίστες;
fibonacci = [5, 8, 13, 21, 34]
fib = fibonacci[:]
a = fib
a.pop()
fib.pop()
a[0] = a[1] = 55
print a
print fib
print fibonacci
[55, 55, 13] [55, 55, 13] [5, 8, 13, 21, 34]
| |
[55, 55, 13] [5, 8, 13] [5, 8, 13, 21, 34]
| |
[55, 55, 13, 21] [5 ,8, 13, 21] [5, 8, 13, 21, 34] |