I have a list of variables as:
listV = ['v1, 'v2', ...,'v200']
I want to do something of the following sort in a cleaner way:
q1 = 'insert into myTable ({}, {}, {},....{})'.format(listV)
My desired output will be:
q1 = 'insert into myTable (v1, v2, v3, ...., v200)'
For fewer number of variables, I am able to write a cleaner code but with 200 variables I am having difficulty creating cleaner code.
I need to create the q1
dynamically as the content of listV
changes but the length of listV
stays constant.