Python tips - Handle text file
#!/usr/bin/python a = set(open(”data.uniq.1″)) b = set(open(”date.uniq.2″)) print len(a; b)Here I find a blog in Chinese also description this tips
#!/usr/bin/python a = set(open(”data.uniq.1″)) b = set(open(”date.uniq.2″)) print len(a; b)Here I find a blog in Chinese also description this tips
This blog copyright 2009 by williamxue
I don't believe that Python is faster than AWK, and even if it were, which I *know* he isn't, I can always compile AWK code into a straight binary executable, so as long as Python doesn't get a state of the art compiler, he will *NEVER* be faster than AWK!
Posted by UX-admin on March 11, 2009 at 02:19 AM CST #