title: Get inside of square brackets in Python
body: <p>I have this string.</p>
  
  <pre><code>"ascascascasc[xx]asdasdasdasd[yy]qweqweqwe"
  </code></pre>
  
  <p>I want to get strings inside brackets. Like this;</p>
  
  <pre><code>"xx", "yy"
  </code></pre>
  
  <p>I have tried this but it did not work:</p>
  
  <pre><code>a = "ascascascasc[xx]asdasdasdasd[yy]qweqweqwe"
  listinside = []
  for i in range(a.count("[")):
      listinside.append(a[a.index("["):a.index("]")])
  print (listinside)
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>['[xx', '[xx']
  </code></pre>