title: How to iterate over string after using split function
body: <p>Here is the string 
  ds = 'Java; Python; Ruby; SQL'
  I have used slip function to split each language and found the count of one language.
  if I want to find if any of 2 languages occur in a string it's returning zero.
  example: in the above variable as both java and python are present it has to return count as one.</p>
  
  <pre><code>def language_both_jp(y):
      count = 0
      prog = (y.split(";"))
      for i in range(0,len(prog)):
          if(prog[i] == 'Java'):
              for i in range(0,len(prog)):
                  if(prog[i] == 'Python'):
                      count += 1
      return count
  </code></pre>