title: Using the 'for loop' - if there are duplicate words on user input, only the first duplicate word shows. How can I display all duplicate words?
body: <p><strong>I am doing a per-word character-counter from a user input.</strong></p>
  
  <p>However, it seems that if there are duplicate words (of the similar case) from the input, my codes will only output the first word (the duplicates will not be included).</p>
  
  <p><em>I have used the split, len and for loop for this.</em></p>
  
  <pre><code>sentence = input("Enter a sentence: ")
  splitting = sentence.split()
  
  final = {x:len(x) for x in splitting}
  print(final)
  </code></pre>
  
  <ul>
  <li><p>Sample input: New phone alert! Your new phone will be available next week.</p></li>
  <li><p>Expected output: {'New': 3, 'phone': 5, 'alert!': 6, 'Your': 4, 'new': 3, 'phone': 5, 'will': 4, 'be': 2 ...}</p></li>
  <li><p>Actual output: {'New': 3, 'phone': 5, 'alert!': 6, 'Your': 4, 'new': 3, 'will': 4, 'be': 2 ...}</p></li>
  </ul>
  
  <p>It shows both 'New' and 'new' as their cases don't match. However, 'phone' is displayed only once.</p>