Q36
What will be the output of the following Python code? def example(L): ''' (list) -> list ''' i = 0 result = [] while i < len(L): result.append(L[i]) i = i + 3 return result
A.
Return a list containing every third item from L starting at index 0
AnswerB.
Return an empty list
C.
Return a list containing every third index from L starting at index 0
D.
Return a list containing the items from L starting from index 0, omitting every third item
Answer: Option A
Solution
Answer: Option A
No explanation is given for this question Let's Discuss on Board