[ create a new paste ] login | about

Link: http://codepad.org/BBWB4fzx    [ raw code | output | fork ]

Python, pasted on Nov 8:
1
2
3
4
5
#!/usr/bin/python
''' ./uniq.py ./data.txt '''
import sys 
with open(sys.argv[1], 'r') as f:
    print ''.join(list(set([i for i in f])))


Output:
1
2
3
4
5
t.py:4: Warning: 'with' will become a reserved keyword in Python 2.6
  Line 4
    with open(sys.argv[1], 'r') as f:
            ^
SyntaxError: invalid syntax


Create a new paste based on this one


Comments: