What will be the output of the following Python statement?

print("red blue green".split())
                        

Options

  • A. red blue green
  • B. ["red", "blue", "green"]
  • C. ["red blue", "green"]
  • D. More than one of the above
  • E. None of the above

Correct Answer (Detailed Explanation is Below)

B. ["red", "blue", "green"]

Detailed Explanation

Explanation: split() divides a string into a list of words using whitespace by default.