QuestionQ10

Control Structures and Iteration

Examine the code snippet below. What is the value of the variable i during the loop's first iteration?

Question Image

  • A is
  • B 1
  • C 0
  • D Python
Explanation

Calling split() on the string produces a list whose first element is Python. The first iteration of the for loop assigns that element to i.

Community Discussion

No comments yet. Be the first to start the discussion!