python code to sort txt file based on last digit on the line

Viewed 17

input file looks like this :

"2009,Dan Films"    1
"2009,Darius Films" 1
"2009,Dark Castle Entertainment"    4
"2009,Darko Entertainment"  1
"2009,Das Kleine Fernsehspiel (ZDF)" 1
"2009,Dash Films"   1

i want to sort the file based on the last value which is the frequency of occurrence of that <year , company> pair in python . Please guide me

0 Answers
Related