Home »
Python »
Python List MCQs
What is the syntax of slicing the list?
12. What is the syntax of slicing the list?
- List (start index, stop index, step)
- List (start index: stop index: step)
- List [start index, stop index, step]
- List [Start index: stop index: step]
Answer: D) List [Start index: stop index: step]
Explanation:
Slicing in python list is used to divide the list according to the start and last index and to do that following syntax is followed: - List [Start index: stop index: step].