input: Write a function to check if a string contains any repeated characters.
  assert detect_pattern("hello") == True
  assert detect_pattern("world") == False
  assert detect_pattern("python") == False
  assert detect_pattern("programming") == True
output: def detect_pattern(s):
      return len(s) != len(set(s))