Python Help ...
Michael Hipp
Michael
Wed Mar 28 09:04:59 PDT 2007
Ben Duncan wrote:
> Ok, I need to CREATE a "Character" array that is 132 characters wide and
> 66 rows deep in Python. I need to stuff text strings into this array.
>
> How do I go about doing this ?
myArray = [
"ABCDEF...132", # 0
#...
"ABCDEF...132", # 131
]
# --OR--
myArray = []
myArray.append("ABCDEF...132") # 0
#...
myArray.append("ABCDEF...132") # 131
Course, you can always use some "for" loop.
row = 65
col = 132
newChar = "X"
myArray[col][row] = newChar
Michael
More information about the Linux-users
mailing list