3
Question Assertion (A): List traversal in Python is done through slicing and using for loop also.
Reasoning (R): Traversal can be done only through forward indexing.
- Both A and R are true and R is the correct explanation of A.
- Both A and R are true but R is not the correct explanation of A.
- A is true but R is false.
- A is false but R is true.
A is true but R is false.
Explanation
List traversal in Python can be done using slicing and a for loop. Both methods allow to access and iterate over elements in a list. Traversal in Python lists can be done through both forward and backward indexing.