Fuzzy matching should be switched off by default, but if you have a space character in your pattern it will turn fuzzy matching on.
If your query didn't have spaces, check your emacs config and make sure helm-ag-fuzzy-match isn't set to t.
For space characters in your pattern you should use the regex \s.
You apparently want to search only within certain contexts, defined by those two Org labels, #+BEGIN_SRC python and #+END_SRC.
You can use Icicles search to do that, defining the search contexts as text that matches a regexp, which you can input at the prompt:
But as a shortcut (and easier on the eyes) you can ...