Unit 1 Session 2 (Click for link to problem statements)
Understand what the interviewer is asking for by using test cases and questions about the problem.
Plan the solution with appropriate visualizations and pseudocode.
General Idea: Loop through a list, and if the index is odd, print out that element.
⚠️ Common Mistakes
def print_indices(lst):
for index in range(len(lst)):
if index % 2 == 1:
print(lst[index])
range(len(LIST))
is the more efficient way to solve the problem in Python.