Advertisement
Guest User

python2-assignment8.4

a guest
May 28th, 2016
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. response = raw_input("Enter file name: ")
  2. lst = []
  3. no_dup=[]
  4.  
  5. with open(response) as file:
  6.  
  7. for line in file:
  8. lst = line.split()
  9. for i in lst:
  10. print ("Item: %s" % i)
  11. if i not in no_dup:
  12. no_dup.append(i)
  13.  
  14. sorted_array=sorted(no_dup)
  15. print sorted_array
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement