nerdexam
Python_Institute

PCAP-31-03 · Question #104

If you want to transform a string into a list of words, what invocation would you use? (Select two answers) Expected output:

The correct answer is A. s.split () C. s.split ("~ "~). See the full explanation below for the reasoning.

Question

If you want to transform a string into a list of words, what invocation would you use? (Select two answers) Expected output:

Exhibit

PCAP-31-03 question #104 exhibit

Options

  • As.split ()
  • Bsplit (s, "~ "~)
  • Cs.split ("~ "~)
  • Dsplit (s)

How the community answered

(46 responses)
  • A
    80% (37)
  • B
    9% (4)
  • D
    11% (5)

Community Discussion

No community discussion yet for this question.

Full PCAP-31-03 Practice