Semi-Newbie needs a little help

Pablo Torres N. tn.pablo at gmail.com
Mon Jul 6 18:30:21 EDT 2009


On Mon, Jul 6, 2009 at 17:02, Nile<nile_mcadams at yahoo.com> wrote:
> Code
>
>    for x in range(len(file_list)):
>    d = open(file_list[x] , "r")
>    data = d.readlines()
>    k = above_or_below(data)                                # This
> function seems to work correctly
>    print "here is the value that was returned " , k
>    dict[k] = dict.get(k,0) + 1
>
>    dict_list = dict.values()
>    print "here is a list of the dictionary values ", dict_list
>    print "the length of the dictionary is ", len(dict)

Correcting your indentation errors and moving your comments above the
line they reference will attract more help from others in this list
;-)

Also, I'd recommend limiting your line length to 80 chars, since lines
are wrapped anyway.


-- 
Pablo Torres N.



More information about the Python-list mailing list