title: Determining if a string is an Isogram
body: <p><strong>The Task</strong>:<br>
  Write a program that checks if a word supplied as the argument is an Isogram. An Isogram is a word in which no letter occurs more than once.</p>
  
  <p>Create a method called is_isogram that takes one argument, a word to test if it's an isogram. This method should return a tuple of the word and a boolean indicating whether it is an isogram.</p>
  
  <p>If the argument supplied is an empty string, return the argument and False: (argument, False). If the argument supplied is not a string, raise a TypeError with the message 'Argument should be a string'.</p>
  
  <p>Example:</p>
  
  <pre><code>is_isogram("abolishment")
  </code></pre>
  
  <p>Expected result:</p>
  
  <pre><code>("abolishment", True)
  </code></pre>
  
  <p>The Visible test</p>
  
  <pre><code>from unittest import TestCase
  
  class IsogramTestCases(TestCase):
    def test_checks_for_isograms(self):
      word = 'abolishment'
      self.assertEqual(
        is_isogram(word),
        (word, True),
        msg="Isogram word, '{}' not detected correctly".format(word)
      )
  
    def test_returns_false_for_nonisograms(self):
      word = 'alphabet'
      self.assertEqual(
        is_isogram(word),
        (word, False),
        msg="Non isogram word, '{}' falsely detected".format(word)
      )
  
    def test_it_only_accepts_strings(self):
      with self.assertRaises(TypeError) as context:
        is_isogram(2)
        self.assertEqual(
          'Argument should be a string',
          context.exception.message,
          'String inputs allowed only'
        )
  </code></pre>
  
  <p><strong>My Solution:</strong></p>
  
  <pre><code>def is_isogram(word):
      if type(word) != str:
          raise TypeError('Argument should be a string')
  
      elif word == "":
        return (word, False)
      else:
          word = word.lower()
          for char in word:
              if word.count(char) &gt; 1:
                  return (word, False)
              else:
                  return (word, True) 
  </code></pre>
  
  <p><strong>But it the function refuses to pass some hidden test: What is wrong with my solution? Is there another elegant way of writing this function?</strong></p>