What does `’hello world’.split()` return?

Python Developer Easy

Python Developer — Easy

What does `’hello world’.split()` return?

Key points

  • The `split()` method divides a string into substrings.
  • The default separator is a space.
  • The correct answer, `['hello', 'world']`, shows the string split into two words.
  • Other options show different formats or incorrect splitting methods.

Ready to go further?

Related questions