Split string > list of sublists of words and characters
<p>No imports allowed (it's a school assignment).</p>

<p>Wish to split a random string into a list of sublists. Words in a sublist, all other characters (including whitespace) would be in a sublist containing only one item. Anyone have some advice on how to do this;</p>

<pre><code>part = "Hi! Goodmorning, I'm fine."
list = [[H,i],[!],[_],[G,o,o,d,m,o,r,n,i,n,g],[,],[_],[I],['],[m],[_],[f,i,n,e],[.]]
</code></pre>

<p>Try this out :</p>

<pre><code>part = "Hi! Goodmorning, I'm fine."
n = part.count(" ")
part = part.split()
k = 0
# Add spaces to the list
for i in range(1,n+1):
    part.insert(i+k, "_")
    k += 1
new = [] # list to return
for s in part:
    new.append([letter for letter in s])
</code></pre>

python python-2.7