char « array « Python Data Type Q&A

Home
Python Data Type Q&A
1.array
2.date
3.dictionary
4.Format
5.integer
6.List
7.numpy
8.regex
9.string
10.tuple
Python Data Type Q&A » array » char 

1. Split string into array with many char pro items    stackoverflow.com

I have a string and I want an array of str for example:

"hello world"
["hel", "lo ", "wor", "ld"]
or
["hell", "o wo", "rld"]
I see that list(message) would be ok but just for
["h", "e", ...

2. 2D array of Chars    python-forum.org

I have searched a lot and have found many ways (most of which do not work) for 2D arrays. I need to load a file into a 2D array, and I already have the loops to do so, but not the array. I tried using NumPy but it only can use numerical types.

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.