title: Sum of random list numbers after 1st negative number
body: <pre class="lang-py prettyprint-override"><code>import random
  
  def mainlist(list, size, min, max):
      for i in range(size):
          list.append(random.randint(min, max))
      print(list)
  
  def counterlist(list):
      for i in list:
          if i&lt;0:
              x=sum(list[(list.index(i)+1):])
              print('Reqemlerin cemi:', x)
              break
         
       
  list = []
  mainlist(list, 10, -10, 30)
  counterlist(list)
  </code></pre>
  <p>I need to calculate sum of numbers after 1st negative number in this random list, did it in second function but want to know is there way not using the <code>sum()</code> function?</p>