Re: [Linux-sohbet] metinde hangi kelime kaç kere kullanılmış

---------

New Message Reply About this list Date view Thread view Subject view Author view Attachment view

From: Bahadır Kandemir (bahadir@haftalik.net)
Date: Mon 20 Oct 2003 - 02:58:03 EEST


Bahadır Kandemir wrote:
> #!/usr/bin/python
>
> import sys
>
> words = ''.join(open('dosya')).split(' ')
> list = []
>
> for w in words:
> if w not in list:
> list.append(w)
>
> print len(list)

Şu an Windows kullandığım için wc komutu aklımdan çıkmış. wc -w <dosya>
aynı işi görüyor yanılmıyorsam. -w argümanından emin değilim, en iyisi
wc --help
_______________________________________________
Linux-sohbet mailing list
Linux-sohbet@liste.linux.org.tr
http://liste.linux.org.tr/mailman/listinfo/linux-sohbet


New Message Reply About this list Date view Thread view Subject view Author view Attachment view

---------

Bu arsiv hypermail 2.1.2 tarafindan uretilmistir.