title: Extracting integer values from a string on Python
body: <p>I've been through every post I could find on the subject and nothing have answered my problem;</p>
  
  <p>This is the code:<br>
  <code>output = 'Scan results for BrainS (192.168.43.111) 
             Scan results for Slave (192.168.43.107)
             Scan results for SlaveSmall (192.168.43.242)'
  while (True)
        if output[i].isdigit():       # i has initial value of 15, j=0
             f[j]=output[i]
             j+=1
             i+=1
        elsif(i == len(output)):
             break
        else:
             i+=1
             continue
  </code></p>
  
  <p>Print:<br>
  <code>&gt;&gt;&gt;f
  ['1','9','2','1','6','8','4','3','1','1','1','0','0','0']</code></p>
  
  <p>As you can see I'm trying to extract the IP as it is with dots(in this code I didnt try to extract the dots but only the numbers),
  I cant figure out how do get the string I want exactly as it is:
  <strong><em>f = 192.168.43.111</em></strong> </p>
  
  <p>Any suggestions? better commands?</p>