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 - Displaying JSON data posts for blog using just the post id -

docusignapi - Documents restrictions within a package -

javascript - angular.forEach loop with $http.get -