I am pulling a list of tables from MySQL and it returns data in this format:
[('A_one_day_minute',)
('A_one_month_daily',)
('A_one_year_daily',)
('A_one_year_weekly',)
('A_six_month_daily',)
('A_three_day_minute',)
('A_three_month_daily',)
('A_three_year_weekly',)
('A_two_day_minute',)
('A_two_month_daily',)
('A_two_year_daily',)
('A_two_year_weekly',)]
However to use this data in the next portion of my code which is to go through each table and insert data into it, I need it in the format below.
Notice even the last tuple at the end of the code above has a comma that will need to be removed.
Desired Format:
('A_one_day_minute',
'A_one_month_daily',
'A_one_year_daily',
'A_one_year_weekly',
'A_six_month_daily',
'A_three_day_minute',
'A_three_month_daily',
'A_three_year_weekly',
'A_two_day_minute',
'A_two_month_daily',
'A_two_year_daily',
'A_two_year_weekly')
I'm not sure how to go about doing this and any help is appreciated, thank you!
tuple(map(lambda x:x[0],a)), where 'a' is the list of tuples.