write python function,which takes one argument, which is a file name [as a string],and computes and prints out each word,followed by alist of lines(numbers),which contain that word.
eg the file is called("sample-text,txt") and then prints something like:
all:[20,30,40,48,50,59]
code:[34]
consider:[7]
found:[48]
ojulla julius 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.