Why did it delete key a and key c, instead of just key c?
<p>I am working on a program to delete blank values from lists inside dictionaries, however if the entire value consists of a single array that holds only a single space, I need to delete the element containing the single space.</p>

<pre><code>def CleanWhiteSpace(theDict) :
    stuff=[]
    for key2 in theDict.keys():
        for value2 in theDict.values(): 
            if value2 == [' ']:
                print key2
                del theDict[key2]
                print "hi"

    print theDict
    for key,value in theDict.iteritems():
        for d in value:
            print value
            if d != ' ':
                    stuff.append(d)    
            theDict[key]=stuff
        stuff=[]

    return theDict
print CleanWhiteSpace({'a':['1','2'],'b':['3',' '],'c':[' ']})
</code></pre>

<p>I only want this to delete key c.</p>
