How to use array.append to construct or build 2-dimension array?
Here we go! Do it lie following step!
===============================
#create two-dimensional array
arr = []
for line in startfile.readlines():
littlearr = []
for letter in line.strip():
littlearr.append(letter)
arr.append(littlearr)
===============================
No comments:
Post a Comment