title: Python: Where does if-endif-statement end?
body: <p>I have the following code:</p>
  
  <pre><code>for i in range(0,numClass):
      if breaks[i] == 0:
          classStart = 0
      else:
          classStart = dataList.index(breaks[i])
          classStart += 1
  classEnd = dataList.index(breaks[i+1])
  
  classList = dataList[classStart:classEnd+1]
  
  classMean = sum(classList)/len(classList)
  print classMean
  preSDCM = 0.0
  for j in range(0,len(classList)):
      sqDev2 = (classList[j] - classMean)**2
      preSDCM += sqDev2
  
  SDCM += preSDCM
  return (SDAM - SDCM)/SDAM
  </code></pre>
  
  <p>I would like to convert this code to VB.NET.</p>
  
  <p>But I am not sure where the if-elseif-statement ends.
  Does it end after "classStart += 1"?</p>
  
  <p>I feel it a bit difficult to see where the for-next-loops end as well in Python.</p>
  
  <p>The code is taken from <a href="http://danieljlewis.org/files/2010/06/Jenks.pdf">http://danieljlewis.org/files/2010/06/Jenks.pdf</a></p>
  
  <p>Thank you.</p>