$ ./guess_the_languageProblem Solving — fix the bug
Problem Solving — fix the bug · easy · #178

Which fix removes the bug?

s = 'hello'
s[0] = 'H'
  1. Rebuild the string
  2. Use a list instead
  3. Call s.upper() first
  4. Decode s to bytes
Strings are immutable; build a new one with slicing or str.replace.
Play Problem Solving ▸