Jul-02-2021, 04:52 AM
Greetings to those that do not sleep!
I kind of asked a similar question before (about counters).
I have a file:
PRQ09_PCX0161Host,DV1
PRQ09_PCX0170Host,PHQ
PRQ09_PCX0171Host,ATC
PRQ09_PCX0173Host,ATC
PRQ09_PCX0175Host,ATC
PRQ09_PCX0176Host,PHQ
PRQ09_PCX0179Host,DG2
PRQ09_PCX0180Host,TGP_H
PRQ09_PCX0183Host,PHQ
PRQ09_PCX0184Host,PHQ
PRQ09_PCX0280Host,TCP_H
PRQ09_PCX0380Host,TCP_H
I need to count similar items after the coma. You guys pointed me to use a "Counter" and it works great.
But now I want to convert a list that has all the lines from the file to a dictionary and use the "Counter" so I do not have to save data to a file and open it for counting elements.
Thank you.

I kind of asked a similar question before (about counters).
I have a file:
PRQ09_PCX0161Host,DV1
PRQ09_PCX0170Host,PHQ
PRQ09_PCX0171Host,ATC
PRQ09_PCX0173Host,ATC
PRQ09_PCX0175Host,ATC
PRQ09_PCX0176Host,PHQ
PRQ09_PCX0179Host,DG2
PRQ09_PCX0180Host,TGP_H
PRQ09_PCX0183Host,PHQ
PRQ09_PCX0184Host,PHQ
PRQ09_PCX0280Host,TCP_H
PRQ09_PCX0380Host,TCP_H
I need to count similar items after the coma. You guys pointed me to use a "Counter" and it works great.
But now I want to convert a list that has all the lines from the file to a dictionary and use the "Counter" so I do not have to save data to a file and open it for counting elements.
Thank you.