Im fetching a row from a table that has multiple values delimited by a ";". I'm trying to store it within a list. Everything works but instead of python printing it as just ['a','b','c']... it is printing it as [['a','b','c']].
Code below
Output
Desired Output
Code below
Code
cur.execute("SELECT * FROM Main_Setup");
rows = cur.fetchall()
job1= []
job2=[]
for row in rows:
name = row[1]
fields = row[4].split(';')
if name == 'File1':
job1.append(fields)
elif name == 'file2':
job2.append(fields)Output
Code
[['this field', ' another field']]
[['haha', 'no', ' yes']]Desired Output
Code
['this field', ' another field']
['haha', 'no', ' yes']
