Program to delete directories that do not contain a file
I didnt check the correctness of code, but... 

Small tips on comments:


Don't write #end if. You have identation. Why do you need it?
Comments for functions should look like


def hasFile(p_path):
    """Returns true if the given directory or any of its children directories have a file in them"""
    for r, d, f in os.walk(p_path):


https://saddlebackcss.github.io/tutorials/python/basic/2016/01/14/python-basics-4

Methods should be called like folder_cleanupand has_file. See https://visualgit.readthedocs.io/en/latest/pages/naming_convention.html

Do not name variables like this for r, d, f in os.walk(p_path):. Make names more meaningfull 

Try to reduce nesting, may be  using early return