Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
79 views
in Technique[技术] by (71.8m points)

python - Adding further array data to the array

I have below code, where data in variables is changed with iterable loop for.

for i in range(self.tableWidget_16.rowCount()):

s = int(self.tableWidget_16.text()) #this data is taken from table , example view from print it: 1042
b = int(self.tableWidget_15.text()) #this data is taken from table , example view from print it: 0
c = int(self.tableWidget_14.text()) #this data is taken from table , example view from print it: 424

array = [[s,b,c]]

''' I have result like this: line 1[1042,0,424] line 2[2425,0,135]

I want like this: line 1[[1042,0,424],[2425,0,135],[...,...,...],...]

How can I do this?

question from:https://stackoverflow.com/questions/65830064/adding-further-array-data-to-the-array

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...