title: python : how to add number between them, when is digit is TRUE
body: <p>I have a problem, I want to add some number between them, but only for some condition, I have a list from web scraping with number and space, the number is a time a soccer match is played by the player, and the space is if the player have score during this match, 1 space = 1 goal, 2 space = 2 goal 3 space : 3 goal.</p>
  <p>So when I import in a excel I can make a rule color, with &quot;space&quot; and see really quick witch match he have scored or not.</p>
  <p>Now I want to know, since how many min the player have not score, and when it score, the counter of min reset to 0.</p>
  <p>So I wrote this :</p>
  <pre><code>
      for list in lists:
          
          go = list.find('td', class_=&quot;tj1&quot;).text.replace('\xa0', '').replace(&quot;'&quot;,&quot;&quot;)
          goo = [go]
          print(goo)
  
  </code></pre>
  <p>and the result is :</p>
  <pre><code>['90   ']
  ['90 ']
  ['90   ']
  ['90   ']
  ['90 ']
  ['68 ']
  ['27']
  ['90']
  ['78 ']
  </code></pre>
  <p>As you can see, there is space in the string, it's the number of score the player have done in this match ( here it's Neymar ), you can see there is two result here :</p>
  <pre><code>['27']
  ['90']
  </code></pre>
  <p>there is no space, so the player have no score in there match, so I have to tell python, to add the number between them and tell me the result as &quot; MAX MIN WITHOUT SCORE &quot;</p>
  <p>and the count : &quot; NOT SCORE A GOAL SINCE ? MIN &quot;, if the player score, the count : &quot;NOT SCORE A GOAL SINCE ? MIN &quot; reset to 0.</p>
  <p>So I wrote this</p>
  <pre><code>for list in lists:
          
          
          go = list.find('td', class_=&quot;tj1&quot;).text.replace('\xa0', '').replace(&quot;'&quot;,&quot;&quot;)
          goo = [go]
          
          print(go)
          x = go.isdigit()
          print(x)
  </code></pre>
  <p>and the result is :</p>
  <pre><code>90   
  False
  90 
  False
  90   
  False
  90   
  False
  90 
  False
  68 
  False
  27
  True
  90
  True
  78 
  False
  </code></pre>
  <p>So now, python can see witch one have space, and which one don't have, so my question, how can I do for add number with the condition &quot;True&quot; and tell me the &quot; MAX MIN WHITOUT SCORING &quot; and reset to zero if in the next match it's score for having &quot; NOT SCORED SINCE ? MIN &quot;</p>
  <p>I hope I was clear in my question, thanks for your time, it's very appreciated.</p>
  <p>some exemple of what I want :</p>
  <pre><code>90   
  False
  90 
  False
  90   
  False
  90   
  False
  90 
  False
  68 
  False
  27
  True
  90
  True
  78 
  False
  </code></pre>
  <p>Result :</p>
  <pre><code>MAX MIN WITHOUT SCORING = 90 + 27 = 117 min
  
  NOT SCORED SINCE ? MIN = 0 min
  
  </code></pre>
  <p>other exemple :</p>
  <pre><code>
  90   
  True
  90 
  True
  90   
  True
  90   
  False
  90 
  False
  68 
  False
  27
  False
  90
  True
  78 
  True
  </code></pre>
  <p>Result :</p>
  <pre><code>MAX MIN WITHOUT SCORING = 90 + 90 = 90 = 270 min
  
  NOT SCORED SINCE ? MIN = 90 + 78 = 168 min
  
  </code></pre>