QuestenaՎարժանք, որը ցույց է տալիս՝ ինչ կրկնել հաջորդիվ
Հարց 22

What is returned by `" red blue ".split()` with no separator argument?

  1. A list containing each individual character
  2. `["red", "blue"]`Ճիշտ պատասխան
  3. `["", "red", "", "", "blue", ""]`
  4. The unchanged source string

Բացատրություն

Without an explicit separator, consecutive whitespace acts as one boundary and edge whitespace does not create empty fields. Treating every space independently would introduce empty strings that this form of `split` deliberately omits.

Շարունակեք այս թեստով

Սկսել վարժանքը
Հարց 22: What is returned by `" red blue ".split()` with no… · Python Fundamentals · Questena