title: Add multiple entries of text to specific lines of code in Python
body: <p>I would like to add the flag 
  <code>-c 4</code> 
  to my line of code at 
  <code>hostname = "216.58.223.3 -c 4"</code></p>
  
  <p>The way it currently works:</p>
  
  <pre><code>@staticmethod
  def valve_southafrica_two():
  
      print("Pinging Valve South Africa 2")
      hostname = "155.133.238.163"
      response = os.system("ping " + hostname)
      if response == 0:
          pingstatus = "Active"
      else:
          pingstatus = "Error"
  
      print("Ping Test Complete")
  
      return pingstatus
  </code></pre>
  
  <p>and the way I want it to work is so:</p>
  
  <pre><code>@staticmethod
  def valve_southafrica_two():
  
      print("Pinging Valve South Africa 2")
      hostname = "155.133.238.163 -c 4"
      response = os.system("ping " + hostname)
      if response == 0:
          pingstatus = "Active"
      else:
          pingstatus = "Error"
  
      print("Ping Test Complete")
  
      return pingstatus
  </code></pre>
  
  <p>for Linux +/ MacOS Pinging, is there any way to bulk add the <code>-c 4</code> flag next to the xxx.xxx.xxx.xxx (IP) or is the only solution to manually add the <code>-c 4</code> next to each line?</p>