While using slicing in lists, list[0:2] is equivalent to ______

Q & ACategory: PythonWhile using slicing in lists, list[0:2] is equivalent to ______
Admin Staff asked 5 years ago

While using slicing in lists, list[0:2] is equivalent to ______.

a)list[-2:0]
b)list[0:3] -1
c)list[:2]
d)list[:-2]

1 Answers
Admin Staff answered 5 years ago

c)list[:2]