fork download
  1. def add_is_prefix(input_string):
  2. # Check if the string already starts with "Is"
  3. if input_string.startswith("Is"):
  4. return input_string
  5. else:
  6. # Add "Is" to the front of the string
  7. return "Is" + input_string
  8.  
  9. # Example usage:
  10. print(add_is_prefix("Island")) # Output: Island
  11. print(add_is_prefix("land")) # Output: Island
Success #stdin #stdout 0.04s 9616KB
stdin
Standard input is empty
stdout
Island
Island