I am new to python and working on a project in which i need to create dynamic number of columns in table in a database. For example,
User input = 5
Output=
Database:
table:
col1 col2 col3 col4 col5
Before this, I was creating dynamic number of tables using this loop:
for w in range(number + 1):
IP.execute('CREATE TABLE IF NOT EXISTS table' + str(w) + '(column REAL)')
But now I do not need to create tables but want to add dynamic columns. I tried using similar loop but it does not work. Can anyone help me with this as I don't know much about sqlite