I'm new to Python and I would like to create a string like this :
print("{} INNER JOIN {}".format(table1, table2))
The problem is that table1 and table2 are stored in a list tables_list = ['table1','table2'] and I don't know how many values there are in that list, so if I only have one item in that list, the result of the print would be :
table1
without the join.
I guess I should be looping on tables_list but I can't seem to figure out how to use format in that case.
Any help would be appreciated.