title: return all output from a for loop in python 3
body: <p>I trying to return all results from a loop. the out is just strings of data from basic show commands off cisco devices. Both devices print their output just fine but when i return the for loop I only get the output from the last device in the list.</p>
  
  <p>I have tried a dict list on top of the for loop but the output is string i guess so it does not accept the information.</p>
  
  <pre><code>    # Juniper Normalize the data for command line interface
      juniper_command = '"({})"'.format('|'.join(src_a + src_p + dst_a + dst_p))
      # Device IP list
      fw_a = ['10.90.2.20', '10.90.1.10']
  
      try:
          result = ()
          for ip in fw_a:
              if "true" in str(p_show):
                  device = {"device_type": "juniper_junos", "username": username, "host": ip, "password": password}
                  connection = netmiko.ConnectHandler(**device)
                  connection.find_prompt(delay_factor=2)
                  time.sleep(1)
                  connection.enable()
                  resp = connection.send_command(
                      'show configuration | display xml | match ' + str(juniper_command), delay_factor=2)
                  print(ip + '\n' + resp)
                  result = resp
  
          return result
  </code></pre>
  
  <p>My expected results would be to return all data from the devices in the list.</p>