title: Python - call function within itself (same parameters)
body: <p>I am calling the same function within itself.</p>
  
  <pre><code>base_url="www.myurl.com"
  urls_1="www.myurl.com/1"
  urls_2="www.myurl.com/2"
  rep_1="/report1"
  rep_2="/report2"
  
      def get_response(url, report):
        response=requests.get(url,report, headers=header)
        data=response.json()
  
        if (len(data))==100:
            header.update({"range":rep + str(range_from + 100) + "-" + 
            str(range_to + 100)})
            **data2=get_response(?,?)**
  
       else:
           return data
  </code></pre>
  
  <p>When I call the function inside, I want to use the same parameters that I used to call the outer function.(Only writing the function once)</p>
  
  <p>This outer function gets called hundreds of times with all different parameters; sometimes it gets called within a for loop.</p>
  
  <p>Thanks in advance.</p>