ILLEGAL_WHATEVER 5 packets from SRC to DST between T1 and T2
asdf
asdf
qwerty
asdf
qwerty
Desired:
ILLEGAL_WHATEVER 5 packets from SRC to DST between T1 and T2
3 asdf
2 qwerty
Shouldn't be much harder than
from collections import Counter
#...
c = sorted(Counter(logs).items(),
key=lambda x: x[0])
f = lambda key, count: '\t' + str(count) + '\t + key
log_lines = '\n'.join(f(k,v) for k,v in c)
Now:
Desired:
Shouldn't be much harder than