title: List of the indexes of the cappital letters
body: <p>i want to return a list of the indexes of the capital letters in a word based on a &quot;user_input&quot; word. i tried the code with lot of words and it actually works except wih &quot;TEsT&quot;, it returns [0, 1, 0] instead of [0, 1, 3] :\ What's wrong?</p>
  <p>I actually just read the similar question here, the answer was using &quot;enumerate&quot; to get the tuple of (index, char) at the same time, and check if the character is capital case. But i still wanna know what's wrong with my code :)</p>
  <pre><code>def capital_indexes(string):
      my_list = list(string)
      one_list = []
      for capital in my_list:
          if capital.isupper():
             capital_index = int(my_list.index(capital))
             one_list.append(capital_index)
      print(one_list)
      #return(one_list)
      
      return (one_list)
  
  #capital_indexes(&quot;HeLlO&quot;)          
  
  user_input = str(input(&quot;Enter a word&quot;))
  capital_indexes(user_input)
  </code></pre>