$ ./guess_the_languageProblem Solving — predict the output
Problem Solving — predict the output · medium · #103

What is printed?

print('a-b-c'.split('-', 1))
  1. ['a', 'b-c']
  2. ['a', 'b', 'c']
  3. ['a-b', 'c']
  4. ['a']
The second argument caps how many splits are performed.
Play Problem Solving ▸