6 questions. Covers Aliasing in Python.
Questions 1 to 5 of 6
python import copy a = [[1], [2]] b = a[:] c = copy.deepcopy(a) a[0].append(9) print(b, c)
python rows = 3 cols = 4 flat = [0] * (rows * cols) for r in range(rows): for c in range(cols): flat[r * cols + c] = r * 10 + c r = 0 c = 1 print(flat[r * cols + c], 'then', flat[c * cols + r])
head
b
python head.next = head.next.next
name
None
name.lower() == 'ana'
len(name) == 3
name is not None and name.lower() == 'ana'
name.strip() == 'Ana'
Choose the matching item for each row.
AttributeError
IndexError
RecursionError
TypeError
5 question(s) left on this page.