python - From tuple to 1d array -


i have list [(1,),(2,),(3,),(4,)] how can convert 1d array [1,2,3,4]?

test = [(1,),(2,),(3,),(4,)] single = []  in test:     single.append(i[0])  print(single) 

output

[1, 2, 3, 4] 

Comments

Popular posts from this blog

php - Permission denied. Laravel linux server -

google bigquery - Delta between query execution time and Java query call to finish -

python - Pandas two dataframes multiplication? -