$ ./guess_the_languageProblem Solving — predict the output
Problem Solving — predict the output · easy · #221

What is the output?

print('banana'.replace('a', 'o', 2))
  1. bonana
  2. bonono
  3. banono
  4. bonona
The third argument caps the number of replacements, so only the first two a characters change.
Play Problem Solving ▸