[Tutor] resizing an array of strings?

Jeff Peery jeffpeery at yahoo.com
Mon Jun 6 16:14:55 CEST 2005


Hello, I'm having a bit of trouble resizing/reshaping an array of strings. here's what I'm trying to do:
 
myString = ['hi','my','name','is','Jeff']
reshape(myString, (2,2))
 
What I get from this is something like:
 
[['h','i'],
['m','y']]
 
What I want is:
[['hi','my'],
['name','is']]
 
How might this work best?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20050606/bce5e53c/attachment.html


More information about the Tutor mailing list