moonhkt wrote: > Data file > V1 > V2 > V3 > V4 > V4 > V3 > > How to using count number of data ? > > Output > V1 = 1 > V2 = 1 > V3 =2 > V4 = 2
import collections
with open(data_file) as f:
print(collections.Counter(f.readlines()))
it's a start
--
ZeD
--
http://mail.python.org/mailman/listinfo/python-list
