[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: sort

Here's a chunk of Python code that should do the trick.

lines = open(filename).readlines()

line_dict = {}
for line in lines:
	if line not in line_dict.keys():
		print line
	line_dict[line] = 1

I haven't debugged/tested this.  YMMV.

Have fun.

Stephen W. Juranich                             sjuranic@ee.washington.edu
Electrical Engineering             http://students.washington.edu/sjuranic
University of Washington                http://ssli.ee.washington.edu/ssli

To UNSUBSCRIBE, email to debian-user-request@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Reply to: