You can use an f-string if you're using python 3.6 or above. So, you would do something like:
response = requests.get(url=f"https://{clus_lif}/api/protocols/nfs/export-policies/{policy_id}/rules", auth = ("***", "****"), headers={"accept":"application/hal+json"}, verify=False), where clus_lif and policy_id are variables in my script. I gave this a shot and it worked for me.
Also, in case you're not aware, I wanted to share that we have a netapp_ontap python module that you can use if you're writing scripts that access the ONTAP REST API. It'll definitely make your life a lot easier and is more object oriented. See info here: https://pypi.org/project/netapp-ontap/.