Filtering out letters only and numbers only from dictionary : So basically I have a dictionary called dict_info. Which consists different types of keys. However, I'd like to iterate through these dictionaries then filter out the ones that has ONLY letters and ONLY integers. However if they have both for instance 123456s, 123456q and 123456b. These three key has letters and integers on it. So I'd like to create a json file saving these three key-value. And I'd like to have a space inbetween digits and letters. Like 123456 s, 123456 q, and 123456 b.
So output in my json would something like with everything filtered out 

    output:

    
    {
       123456 q : check
       123456 b : check
       123456 s : check
    }

    def check_if_works():
            dict_info = {}
            dict_info['1234'] = "check"
            dict_info['12456s'] = "check"
            dict_info['12456q'] = "check"
            dict_info['12456b'] = "check"
            dict_info['123456'] = "check"
            dict_info['asdftes'] = "check"
            dict_info['asdftess'] = "check"
            dict_info['asdftessd'] = "check"
            arr = []
            for key,value in dict_info.iteritems():
                    try:
                            check_if_digits_only = int(key)
                            check_if_letters_only = key.isalpha()
                            
                            
                    except:
                            
                            new_dict = {}
                            new_dict[key] = value
                            arr.append(new_dict)
                            print arr
                            with open('output.json','wb') as outfile:
                                    json.dump(arr,outfile,indent=4)
    
    check_if_works()