Hello everyone i am new to python and i have gone through articles but its not helping me in completing the following:
I have something like this............
10280341|2012-10-03 19:11:06.390|Sami|abc|Crossword|70
10280343|2012-10-03 19:15:32.173|Sami|aaa|Sudoku|30
10280355|2012-10-04 19:15:32.173|miami|bbb|Chaircar|15
10280366|2012-10-04 19:15:32.173|miami|bob|Avista|35

And what i want as o/p is this..........
2012-10-03
Sami|2|100

2012-10-04
miami|3|50

Use split method line.split('|') and collect the information. Is the information sorted on the third field like your sample looks like? If so, you can just add up the points, otherwise use a dictionary. Do not forget to change the string of digits to integer.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.