Create a terraform template using python

I need to generate the terraform env.auto.tfvars file everytime i add a new account using python, please can someone help me to get started. I am getting clueless as to where to start?